redis默认安装在 /usr/local/bin文件夹下
执行cd /usr/local/bin 显示
要设置后台启动
1.先备份redis.conf:拷贝到其它目录
2.修改redis.conf文件将里面的daemonize no改成yes,让服务在后台启动
3.启动命令:执行 redis-server /myredis/redis.conf
这里我已经复制好了,也修改好了。
先进入备份的文件夹,不进入也行但启动时要写完整地址
cd /opt/redis
启动命令
redis-server redis.conf
启动时什么都不显示是正常的
ps -ef | grep redis 命令查看是否启动
redis-cli 开启客户端
退出客户端CTRL+C或者exit
输入ping,输出pang表示连接成功