This could be done using chkconfig program
To check the service startup option in different runlevels (i.e. mysqld):
chkconfig | grep mysqld
to enable a service in all runlevels
chkconfig mysql on
to enable a service in specific runlevel
chkconfig --level 3 mysqld on
To add a new service:
chkconfig --add mysqld
Linux RunLevels:
0 - System halt; no activity, the system can be safely powered down.
1 - Single user; rarely used.
2 - Multiple users, no NFS (network filesystem); also used rarely.
3 - Multiple users, command line (i.e., all-text mode) interface; the standard runlevel for most Linux-based server hardware.
4 - User-definable
5 - Multiple users, GUI (graphical user interface); the standard runlevel for most Linux-based desktop systems.
6 - Reboot; used when restarting the system.
To check the service startup option in different runlevels (i.e. mysqld):
chkconfig | grep mysqld
to enable a service in all runlevels
chkconfig mysql on
to enable a service in specific runlevel
chkconfig --level 3 mysqld on
To add a new service:
chkconfig --add mysqld
Linux RunLevels:
0 - System halt; no activity, the system can be safely powered down.
1 - Single user; rarely used.
2 - Multiple users, no NFS (network filesystem); also used rarely.
3 - Multiple users, command line (i.e., all-text mode) interface; the standard runlevel for most Linux-based server hardware.
4 - User-definable
5 - Multiple users, GUI (graphical user interface); the standard runlevel for most Linux-based desktop systems.
6 - Reboot; used when restarting the system.
No comments:
Post a Comment