1,redis 安裝
yum install redis -y
2,啓動
配置文件在src目錄,修改redis.conf -> daemonize no 改爲 daemonize yes
啓動服務: ./src/redis-server redis.conf
停止服務:
1,查看pid ps -ef | grep redis | awk '{print $2}'
2,kill -9 pid
遠程連接
查看redis密碼, 有註釋符號刪掉,修改永久生效:
redis.conf -> requirepass 123
使用命令修改,臨時生效,重啓redis,密碼失效 :config set requirepass 123456
redis-cli -h 10.3.34.101 -p 6379(端口) -a 密碼