redis开机自启
作者:互联网
cat > /usr/lib/systemd/system/redis.service <<'EOF'
[Unit]
Description=Redis persistent key-value database
After=network.target
[Service]
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd
#ExecStop=/usr/libexec/redis-shutdown # 不设置这一行也可以stop
Type=notify
#User=redis
#Group=redis
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
EOF
标签:systemd,service,lib,redis,system,cat,自启,开机 来源: https://www.cnblogs.com/yzgblogs/p/15853695.html