学习笔记|centos之redis安装

1、解压

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

2、yum安装gcc依赖
yum install gcc

3、编译安装
cd redis-4.0.6make MALLOC=libccd src && make install

4、以后台进程方式启动redis
vim redis.conf#daemonize yes #bind 127.0.0.1 #protected-mode no

【学习笔记|centos之redis安装】
cd /etc mkdir redis cp /***/redis-4.0.6/redis.conf /etc/redis/6379.conf cp /***/redis-4.0.6/utils/redis_init_script /etc/init.d/redisd cd /etc/init.dvim redisd #头两行添加 # chkconfig:2345 90 10 # description:Redis is a persistent key-value databasechkconfig redisd onservice redisd start#启动 service redisd stop#关闭 


    推荐阅读