安装命令:
cd /home/wofang
tar -zxf redis-5.0.5.tar.gz
cd redis-5.0.5
make
make test
yum install tcl
make install
mkdir -p /data/server/redisdata
cp redis.conf /data/server/redisdata/
编辑配置文件:
#打开配置文件修改以下内容:vim /data/server/redisdata/redis.conf
daemonize yes
pidfile /var/run/redis.pid
port 9637
dbfilename dump.rdb
dir /data/server/redisdata
logfile "/data/server/redisdata/redis.log"
#设置redis登录密码:
#修改配置文件/data/server/redisdata/redis.conf
requirepass 135246
#启动redis-server:
/usr/local/bin/redis-server /data/server/redisdata/redis.conf
#停止redis-server:
redis-cli -p 6379 shutdown