标签:arch col /etc cli sysconf start 文件 port yum
//如果没有yum源
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install -y http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum install redis
启动
service redis start
or
nohup redis-server > /dev/null 2>&1 &
客户端
redis-cli
配置文件
/etc/redis.conf
修改为允许远程连接
bind ip注释掉
protected-mode no
打开防火墙端口,
vim /etc/sysconfig/iptables
追加
-A INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT
重启防火墙,重启redis
service iptables restart
service redis restart
如果发现redis没有重启,
ps -ef | grep redis
找到,kill, start
远程测试
redis-cli -h 192.168.2.22
标签:arch col /etc cli sysconf start 文件 port yum
原文地址:https://www.cnblogs.com/woshimrf/p/centos-install-redis.html