服务
systemctl
服务相关
- 注册服务
- chkconfig --add test
- 直接启动即可
- 删除服务
- chkconfig --del xxx
- 停掉应用,并删除对应的配置文件
- 启动服务
- systemctl start httpd.service
- service httpd start
- 停止服务
- systemctl stop httpd.service
- service httpd stop
- 重启服务
- systemctl restart httpd.service
- service httpd.service restart
- 查看服务状态
- service httpd status
- systemctl status httpd.service
- 使服务自启动
- chkconfig --level 3 httpd on
- systemctl enable httpd.service
- 使服务不自启动
- chkconfig --level 3 httpd off
- systemctl diable httpd.service
- 重新加载服务
- systemctl reload ****.service
- systemctl daemon-reload
服务脚本
- unit 在/etc/systemd/system中添加unit脚本,取名为*.service
[Unit]
De ion=shadowsocks client
After=network.target
[Service]
ExecStart=/usr/local/bin/sslocal -c /etc/shadowsocks.json -- 这里好像要全路径的命令
[Install]
WantedBy=multi-user.target
继续阅读与本文标签相同的文章
上一篇 :
GeoDB透露2020年上半年计划 欲向美市进军
下一篇 :
Mac地址洪范攻击
-
特斯拉明年将在日本安装家用蓄电池 首次在亚洲亮相
2026-05-19栏目: 教程
-
原创教程:创建邮箱群组,同时发给诸多收件人
2026-05-19栏目: 教程
-
揭秘!大数据知识工程到底是什么
2026-05-19栏目: 教程
-
微软:所有Windows 10用户默认启用Defender篡改保护功能
2026-05-19栏目: 教程
-
国际机器人联合会:全球工业机器人2019报告
2026-05-19栏目: 教程
