dayid |
06-20-2013 10:29 AM |
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
I typically am told to do something like "chkconfig --levels 235 httpd on" after installing some software. I've always assumed this is so the application starts at boottime.
|
Not quite. It is to set that service to run in the runlevels you have set - in your case, to make the service 'httpd' run when the system is in runlevels "2", "3", or "5"
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
Why isn't the "add" option needed?
|
The add isn't needed if chkconfig is already aware of the service. "add" is to "add" a service to be managed - not to "add" a service to a runlevel.
Quote:
Originally Posted by man chkconfig
--add name
This option adds a new service for management by chkconfig.
|
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
I then tried 'chkconfig --list', and received the following. I see how httpd and mysqld show on for 2, 3, and 5, and vsftpd shows on for 2, 3, 4,and 5 which is the default.
|
Yep, so when the system is in runlevels 2, 3, or 5 - httpd and mysqld will run. vsftpd will run in runlevels 2, 3, 4, or 5.
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
I then looked in /etc/rcx.d directories, and I see some symbolic links which point to ../init.d/vsftpd, etc. If a number was included in chkconfig, then there is a S before the symbolic link name, otherwise a K. Then a two digit number follows, then the name (i.e. vsftpd). Maybe the S stands for Start, and K for Kill?
|
Yep - and the number is order - so if you need mysqld to start in runlevel 2 before httpd, you can set that order.
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
What is the difference between the different levels?
|
That's a big topic to discuss here, but here's this section that summarizes nicely:
Quote:
Originally Posted by http://en.wikipedia.org/wiki/Runlevel
Linux Standard Base specification[edit]
Conforming implementations are not required to provide these exact run levels or give them the meanings described here, and may map any level described here to a different level which provides the equivalent functionality.[1]
LSB 4.1.0
ID Name Description
0 Halt Shuts down the system.
1 Single-user Mode Mode for administrative tasks.[2][2]
2 Multi-user Mode Does not configure network interfaces and does not export networks services.[3]
3 Multi-user Mode with Networking Starts the system normally.[4]
4 Not used/User-definable For special purposes.
5 Start the system normally with appropriate display manager. ( with GUI ) As runlevel 3 + display manager.
6 Reboot Reboots the system.
|
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
What are these files in /etc/init.d?
|
They're init files.
Quote:
Originally Posted by NotionCommotion
(Post 4975429)
I thought all files in /etc were supposed to be text files.
|
They are - if you open them, they're simple text files that tell init what to do when given particular arguments.
|