centos7安装redis
2019-04-26 本文已影响0人
火车叨位去去
1.redis下载
wget http://download.redis.io/releases/redis-2.8.14.tar.gz
2.解压,编译
tar -zxvf redis-2.8.14.tar.gz
cd redis-2.8.14
make PREFIX=/usr/local/redis install
#将配置文件文件拷贝到安装目录下
cp redis.conf /usr/local/redis/
3.加入环境变量
export PATH=/usr/local/redis/bin/:$PATH
source /etc/profile #重启生效
4.后台启动与关闭
nohup /usr/local/redis/bin/redis-server /usr/local/redis/redis.conf & #后台启动
/usr/local/redis/bin/redis-cli shutdown #关闭
5.查看redis进程
ps -ef |grep redis