Systemd 设置开机自启动服务 centos 6 7

Systemd 如何设置 开机启动 守护进程

https://blog.csdn.net/chenhao_c_h/article/details/92064209

Linux系统安全强化指南

https://zhuanlan.zhihu.com/p/450774477

https://www.freedesktop.org/software/systemd/man/systemd.exec.html

http://www.jinbuguo.com/systemd/systemd.service.html

nginx安装及其配置详细教程

https://www.cnblogs.com/lywJ/p/10710361.html

springboot自启动脚本shell、systemctl以及service文件Environment用法

https://blog.csdn.net/weixin_39992480/article/details/102761989

systemd 脚本设置服务

https://blog.csdn.net/liuwei0376/article/details/111472935

编写systemd service文件

https://blog.csdn.net/djskl/article/details/46671453

如何编写一个Systemd Service

https://segmentfault.com/a/1190000014740871

https://unix.stackexchange.com/questions/506347/why-do-most-systemd-examples-contain-wantedby-multi-user-target/506374

如何优雅的使用 Systemd 管理服务

https://zhuanlan.zhihu.com/p/271071439

systemctl使用reload及踩坑

https://blog.csdn.net/weixin_39992480/article/details/95484293

第十二章 systemctl管理脚本

http://www.bubuko.com/infodetail-3702918.html

centos 6

/etc/init.d/sshd restart
/etc/init.d/sshd reload

service sshd restart

centos 7

systemctl status sshd.service
systemctl restart sshd.service

/etc/rc.local 与 /etc/init.d Linux 开机自动运行程序

https://www.cnblogs.com/fatt/p/4790561.html

linux的开机启动过程(rc.local、init.d、rc.x、init的作用)

https://blog.csdn.net/wngua/article/details/54668895

[root@node1 init.d]# ls -l /etc/rc.d
总用量 4
drwxr-xr-x. 2 root root 113 1月  30 13:39 init.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc0.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc1.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc2.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc3.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc4.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc5.d
drwxr-xr-x. 2 root root  82 2月   8 09:47 rc6.d
-rw-r--r--. 1 root root 473 10月 31 2018 rc.local
[root@node1 init.d]# ls -l /etc/rc.d/init.d
总用量 60
-rw-r--r--. 1 root  root  18281 8月  24 2018 functions
-rwxr-xr-x. 1 root  root    754 11月 15 09:44 mxagentrun
-rwxr-xr-x. 1 mysql mysql 10576 4月   8 2018 mysql
-rwxr-xr-x. 1 root  root   4569 8月  24 2018 netconsole
-rwxr-xr-x. 1 root  root   7923 8月  24 2018 network
-rw-r--r--. 1 root  root   1160 10月 31 2018 README
-rwxr-xr-x. 1 root  root   3476 8月   9 2019 sshd
[root@node1 init.d]# ls -l /etc/init.d
lrwxrwxrwx. 1 root root 11 5月  24 2021 /etc/init.d -> rc.d/init.d
[root@node1 init.d]# ls -l /etc/rc.local
lrwxrwxrwx. 1 root root 13 5月  24 2021 /etc/rc.local -> rc.d/rc.local
[root@node1 init.d]# 
原文地址:https://www.cnblogs.com/tonggc1668/p/15783872.html