Adding a Service to Autostart (CentOS 6/7)
Posted by Alexei V. on 15/03/2015 16:43
To add a service to autostart, there is chkconfig service. By default, freshly installed CentOS distribution package includes many additional services.
The syntax of the service:
You can see loadable services with the following command:
Check whether httpd is included in autostart:
Set performance level 3 and check:
Enable the service at all levels:
RedHat Linux distribution packages such as CentOS, Fedora includes SysV Init, which consists of 6 levels of system boot (runlevels).
It is recommended to enable services at the 3rd .
To set a service to start on boot you can use systemctl:
To make sure a service does not start on boot:
You can check if a service is enabled or disable: