先查看redisd的端口占用,然后在杀死这个端口
[root@imooc redis-6.2.6]# ps -ef |grep redis
root 1218 1 0 14:00 ? 00:00:01 /usr/local/redis-4.0.14/src/redis-server 127.0.0.1:6379
root 7679 7550 0 14:20 pts/0 00:00:00 grep --color=auto redis
[root@imooc redis-6.2.6]# kill -9 1218
在重新启动redis就可以了
./src/redis-server redis.conf
[root@imooc redis-6.2.6]# ./src/redis-server redis.conf
7768:C 20 Apr 2022 14:26:51.974 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7768:C 20 Apr 2022 14:26:51.974 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=7768, just started
7768:C 20 Apr 2022 14:26:51.974 # Configuration loaded
7768:M 20 Apr 2022 14:26:51.975 * Increased maximum number of open files to 10032 (it was originally set to 1024).
7768:M 20 Apr 2022 14:26:51.975 * monotonic clock: POSIX clock_gettime
_._