//安装之前先确认是否安装了 gcc
//如果没有安装的话输入以下命令
yum install gcc
tar xzvf redis-4.0.8.tar.gz
cd redis-4.0.8
make
cd src
make install PREFIX=/usr/local/redis
cd ../
mkdir /usr/local/redis/etc
mv redis.conf /usr/local/redis/etc
vi /usr/local/redis/etc/redis.conf
//将daemonize no 改成daemonize yes
vi /etc/rc.local
//在里面添加内容:
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
//(意思就是开机调用这段开启redis的命令)
/usr/local/redis/bin/redis-server /usr/local/redis/etc/redis.conf
//查看是否启动
ps -ef |grep redis
//开启redis客户端测试
/usr/local/redis/bin/redis-cli
centos7_64 install (安装) redis
最新推荐文章于 2024-08-29 11:38:13 发布