Service Operations on CentOS

https://www.notion.so/Service-Operations-on-CentOS-e2dbd2619fa24666ba86d19f4e6297a5

Enable or disable service on OS start

1
2
3
4
5
6
$ systemctl disable httpd
rm '/etc/systemd/system/multi-user.target.wants/httpd.service'

$ systemctl status httpd
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; **disabled**)
1
2
3
4
5
6
$ systemctl enable httpd
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

$ systemctl status httpd
httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; **enabled**)
This post is licensed under CC BY 4.0 by the author.