Redis开机自启配置
作者:互联网
Redis 开机自启配置
vi /usr/lib/systemd/system/redis.service
#!/bin/sh [Unit] Description=Redis service After=network.target [Service] Type=forking #服务启停 ExecStart=/usr/local/bin/redis-server /home/redis/6379.conf ExecStop=/usr/local/bin/redis-cli -a 123456 shutdown PrivateTmp=true [Install] WantedBy=multi-user.target
systemctl enable redis.service && systemctl start redis.service && systemctl stop redis.service
标签:bin,systemctl,service,Redis,redis,自启,usr,开机 来源: https://www.cnblogs.com/cjzzz/p/16338426.html