- 下载安装包
wget http://download.redis.io/releases/redis-5.0.8.tar.gz
- 解压
tar zxvf redis-4.0.5.tar.gz
- 安装gcc
gcc:yum install gcc
cd redis-5.0.8
make MALLOC=libc
cd src
make install PREFIX=/usr/local/redis
- 移动位置
cd ..
mkdir /usr/local/redis/etc
mv redis.conf /usr/local/redis/etc
- 设置后台启动
vim /usr/local/redis/etc/redis.conf //将daemonize no 改成daemonize yes
vim /etc/rc.local //在里面添加内容:/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
chmod 755 /etc/rc.d/rc.local //授于可执行权限
- 启动redis
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
网友评论