本文共 590 字,大约阅读时间需要 1 分钟。
如果 which redis
和 whereis redis
命令无法找到 Redis 的安装目录,可以尝试以下方法:
ps -ef | grep redis
找到对应的进程号(例如:xxxx
),然后使用:ls -l /proc/xxxx/cwd
这将显示出 Redis 的安装目录。使用 whereis
命令查找 Redis-cli 和 Redis-server 的安装位置:
whereis redis-cli
whereis redis-server
./redis-cli
auth <密码>
如果直接在安装目录中使用 ./redis-cli shutdown
无法关闭 Redis,建议使用方法一。
使用 find
命令进行模糊搜索:
find / -name redis*
注意:此命令会搜索根目录下的所有名为以 "redis" 开头的文件和目录。 转载地址:http://nikfk.baihongyu.com/