Center OS7(阿里云) 配置 Redis4 远程连接

下载 安装 redis (参考百度文库)

$ cd /download
$ wget http://download.redis.io/redis-stable.tar.gz
$ tar -xvf redis.....
$ cd redis-stable
$ make
$ make install
执行./utils/install_server.sh配置Redis配置之后Redis能随系统启动。
.....

端口开启设置

$ iptables -A INPUT -p tcp --dport 6379 -j ACCEPT
开启阿里云安全组端口

设置权限

$ vi /etc/redis/6379.conf // 6379 是端口号
添加


bind 0.0.0.0
requirepass 123456


$ service redis_6379 restart

设置 timeout

$ vi /etc/redis/6379.conf // yum 安装路径为 etc/redis.conf
加入


timeout 0
tcp-keepalive 0


参考
http://www.cnblogs.com/kreo/p/4423362.html

你可能感兴趣的:(Center OS7(阿里云) 配置 Redis4 远程连接)