Centos7 redis7.2 无法启动

使用yum install 安装了 redis
新增了一个配置文件和服务启动项
redis-server /etc/redis.clu/7001/redis.conf 命令行直接输入可以正常启动

bind 0.0.0.0
daemonize no
port 7001
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
masterauth 123456
pidfile redis.pid
requirepass 123456

但是使用systemctrl无法正常启动
#!/bin/bash
[Unit]
Description=redis clu

[Service]
Type=simple
ExecStart=redis-server /etc/redis.clu/7001/redis.conf
User=root
Group=root

[Install]
WantedBy=multi-user.target

错误提示
19100:M 31 Aug 2025 12:24:53.133 * monotonic clock: POSIX clock_gettime
19100:M 31 Aug 2025 12:24:53.135 # Failed to write PID file: Permission denied
19100:M 31 Aug 2025 12:24:53.135 * Running mode=cluster, port=7001.
19100:M 31 Aug 2025 12:24:53.135 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
19100:M 31 Aug 2025 12:24:53.135 # Can't open nodes.conf in order to acquire a lock: Permission denied

posted @ 2025-08-31 12:28  不存在的马飞飞  阅读(66)  评论(0)    收藏  举报