EPEL 是yum的一个软件源,里面包含了许多基本源里没有的软件。安装EPEL源命令如下
rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm yum update --更新yum源,可不写1、安装jemalloc(不推荐yum安装)
yum install jemalloc -y --必须安装jemalloc,如果失败,就wget下来在用rpm方式安装 -- rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm --可以不用装 -- yum install kobo-rpmlib -y --可以不用装
rpm安装jemalloc(推荐rpm安装)
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/jemalloc-3.6.0-1.el6.x86_64.rpm rpm -ivh jemalloc-3.6.0-1.el6.x86_64.rpm2、下载并安装redis3.0.4(选择)
rpm -ivh ftp://fr2.rpmfind.net/linux/remi/enterprise/6/remi/x86_64/redis-3.0.4-1.el6.remi.x86_64.rpm --从ftp上下载指定版本3.0.4的redis进行安装
3、修改配置文件
4、修改/data/redis目录权限
mkdir /data/redischown -R redis:redis /data/redis chmod -R 744 /data/redis5、启动Redis服务
chkconfig redis onservice redis start --启动redis服务redis-server --version --查看redis版本号6、本地测试Redis
redis-cli --连接redis redis-cli -h 127.0.0.1 -p 6379 -a 指定密码set name 存储的值 --设置key,value get name --读取key exit --退出redis删除满足redis查询结果的所有key
redis-cli -a 密码 keys "*.html" | xargs redis-cli -a 密码 del7、设置防火墙
iptables -I INPUT -p tcp --dport 6379 -j ACCEPT service iptables save service iptables restart cat /etc/sysconfig/iptables8、redis常用命令
http://doc.redisfans.com/
转载于:https://www.cnblogs.com/qiyebao/p/4810712.html
