redis4安装

1.下载redis

wget http://download.redis.io/releases/redis-4.0.10.tar.gz

2.解压安装包

mkdir /usr/local/work/
tar
-zxf redis-4.0.10.tar.gz -C /usr/local/work/

3.编译安装

ln -s /usr/local/work/redis-4.0.10/ /usr/local/work/redis
cd /usr/local/work/redis
make & make install

4.初始化redis

 ./utils/install_server.sh 

#一直Enter即为默认配置
#设置redis的端口,启动的配置文件位置,日志位置以及可执行脚本的位置

5.取消安全模式和本地访问绑定

sed -i 's/slave-read-only yes/slave-read-only no/g' /etc/redis/6379.conf
sed -i 's/bind 127.0.0.1/#bind 127.0.0.1/g' /etc/redis/6379.conf
sed -i 's/protected-mode yes/protected-mode no/g' /etc/redis/6379.conf

6.启动服务

systemctl start redis_6379
systemctl enable redis_6379

 

posted @ 2018-06-25 20:55  Blue_Smile  阅读(2050)  评论(0编辑  收藏  举报