How to enable the program to autostart, or vice versa, remove from startup CentOS?
View a list of startup can be with the command:
# / Sbin / chkconfig –list
7 displays performance levels, which are designated by numbers from 0 to 6.
Level 0 – stop system (halt) – the system must be stopped;
Level 1 – single-user mode – the system initiates a minimum of services and provides a single user (usually root) without an authentication command line. Typically, this is used to restore the system;
Level 2 – multiplayer mode – users can work on different terminals, the login authentication process;
Level 3 – multiplayer network mode – in contrast to the previous level is tuned network and run various network services;
Level 4 – has no standard interpretation and hardly used;
Level 5 – run graphics – compared with the level 3 is also produced graphics start X11, and logging is carried out in the graphical mode;
Level 6 – reboot the system – when entering this mode stops all running programs and the restart.
Basically, use levels 2, 3, 5.
Add to the startup process, use the command:
# Chkconfig -add nginx
which automatically activates the 2, 3, 4, 5 levels. You can also specify the required levels:
# Chkconfig –level 345 nginx on
How to remove a program from startup?
# Chkconfig –del nginx
How to add the service to startup?
# Chkconfig –add nginx