Skip to main content

centos配置开机启动

此处以 shadowsocks 服务为例

创建文件#

vi /etc/systemd/system/shadowsocks.service

写入以下内容并保存#

[Unit]Description=Shadowsocks
[Service]TimeoutStartSec=0ExecStart=/usr/bin/ssserver -c /shadowsocks/server-config.json
[Install]WantedBy=multi-user.target

设置开机启动#

systemctl enable shadowsocks

启动服务#

systemctl start shadowsocks

systemctl status shadowsocks