为啥在centOS虚拟机中设置redis自动开启会失败

[root@localhost redis-6.0.6]# systemctl start redis
Job for redis.service failed because the control process exited with error code. See "systemctl status redis.service" and "journalctl -xe" for details
[root@localhost redis-6.0.6]# systemctl status redis
● redis.service - redis-server
Loaded: loaded (/etc/systemd/system/redis.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since 日 2022-03-20 00:34:16 CST; 5s ago
Process: 6187 ExecStart=/usr/local/bin/redis-server /usr/local/src/redis-6.0.6/redis.conf (code=exited, status=1/FAILURE)
Main PID: 5635 (code=exited, status=1/FAILURE)

3月 20 00:34:16 localhost.localdomain systemd[1]: Starting redis-server
3月 20 00:34:16 localhost.localdomain redis-server[6187]: 6187:C 20 Mar 2022 00:34:16.426 # Fatal error, can't open ...onf'
3月 20 00:34:16 localhost.localdomain systemd[1]: redis.service: control process exited, code=exited status=1
3月 20 00:34:16 localhost.localdomain systemd[1]: Failed to start redis-server
3月 20 00:34:16 localhost.localdomain systemd[1]: Unit redis.service entered failed state
3月 20 00:34:16 localhost.localdomain systemd[1]: redis.service failed
Hint: Some lines were ellipsized, use -l to show in full

查一下报错日志是什么,日志去定位问题。

/usr/local/src/redis-6.0.6/redis.conf

这个文件是不是权限不对,配置不对,

我也遇到这个问题了,然后发现是之前启动的redis占着6379的端口了,所以启动失败