查找redis安装位置
能打开redis-cli
redis-cli -p port
auth password
info server
不能打开redis-cli
whereis redis-cli
whereis redis-server
whereis redis.conf
复制配置文件redis.conf
复制redis.conf为新的配置文件 , 如redis6378.conf
修
修改配置文件中的:
pidfile 为 /var/run/redis/redis6378-server.pid
logfile 为 /var/log/redis/redis6378-server.log
dbfilename 为 redis6378.rdb
启动redisredis-server /www/server/redis/redis6378.conf
如果报 -bash: redis-server: command not found
需要创建redis-server的软链 , 查看我的软链文章: 建立linux软链_苗先生的PHP记录的博客-CSDN博客
查看是否启动成功ps -ef | grep redis-server