Linux file server httpd starts automatically at boot

1. Related commands

1. View all system services

systemctl list-units --all --type=service

2. Query service status

systemctl status httpd.service

3. Query whether the service is started at boot

systemctl is-enabled crond.service

enabledYesdisabledNo

4. Set the service to boot state

systemctl enable service

A system link is automatically created

Created symlink from /etc/systemd/system/multi-user.target.wants/crond.service to /usr/lib/systemd/system/crond.service.

5. Set the service to boot and not start

systemctl disable crond

will automatically remove the system link

Removed symlink /etc/systemd/system/multi-user.target.wants/crond.service.

2. Set httpd to start automatically at boot

systemctl enable service

Just restart.

For more blog content, please refer to my blog Wang's Blog

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324853338&siteId=291194637
Recommended