离线安装redis、配置redis-cli

yum install wget
wget http://download.redis.io/releases/redis-3.2.4.tar.gz
cp redis-3.2.4.tar.gz /usr/local/redis-3.2.4
make && make install

#配置文件修改
vim /usr/local/redis-3.2.4/redis.conf
bind=192.168.110.128
daemonize=yes #必须设置为yes才能后台启动,否则只能前台启动)

#redis-cli全局配置
vim /etc/profile
export PATH=$PATH:/etc/local/redis-3.2.4/src/redis-cli
source /etc/profile

#启动
redis-server redis.conf

redis中无配置启动用户信息,需要添加redis用户,后以其启动

useradd -s /bash/false -M redis

sudo -u redis /xxx/redis-server /xxx/etc/redis.conf >/dev/null 2>&1 &

 

posted @ 2020-07-03 16:15  Fmaj-7  阅读(346)  评论(0)    收藏  举报