重新配置下文件
[Unit]
Description=Redis
After=network.target
[Service]
ExecStart=/usr/local/bin/redis-server /usr/local/src/redis-6.2.7/redis.conf
ExecStop=/usr/local/bin/redis-cli -h 127.0.0.1 -p 6379 shutdown
[Install]
WantedBy=multi-user.target
注意路径改成本地的
然后重新加载下
systemctl daemon-reload