centos7安装redis

下载wget http://download.redis.io/releases/redis-4.0.6.tar.gz

解压tar -zxvf redis-4.0.6.tar.gz

cd redis-4.0.6make MALLOC=libccd src && make install./redis-server修改配置文件
将daemonize no修改为daemonize yes./redis-server /usr/local/redis-4.0.6/redis.conf设置开机启动在/etc目录下新建redis目录
cp /usr/local/redis-4.0.6/redis.conf /etc/redis/6379.conf
cp /usr/local/redis-4.0.6/utils/redis_init_script /etc/init.d/redisd
chkconfig redisd on报错如下
service redisd does not support chkconfig 编辑redisd文件,在第一行加入如下两行注释,保存退出
# chkconfig:   2345 90 10
# description:  Redis is a persistent key-value database再次执行
chkconfig redisd on

启动服务:

service redisd start 

相关推荐