View Full Version : init.d start up scripts
anitha2324
23rd November 2008, 06:55 PM
Hi All,
I am newbie to linux , i am using fedora 8 , i have installed some softwares like mysql , apache ...etc , but the problem is that all those services are not starting at the boot time automatically,
for starting that i have to do it manually , for example to start mysql , i have to do that manually using the command
#/etc/init.d/mysqld start
is my installation of the software is wrong , or is it something related to some settings in some configuration files , please help me and let me know
BlueC
23rd November 2008, 08:02 PM
see "man chkconfig"
for example, a (simplified) way to make mysqld start at boot would be:
chkconfig mysqld on
and to see what software is configured to run at boot on all different run levels:
chkconfig --list
as I said, see "man chkconfig" for more info.
hth
C
marcrblevins
23rd November 2008, 09:38 PM
You use yum to install those package right? If so, then chkconfig is the right way.
If you downloaded the package elsewhere that are not a .rpm file and manually installed it yourself, you are out of luck.
anitha2324
23rd November 2008, 10:55 PM
thanks for the reply
yes i have installed them using yum , i ll check chkconfig
anitha2324
24th November 2008, 05:34 PM
Hi thanks alot for the help
i have execute this command
#chkconfig mysqld on
and now mysql is starting automatically when the system boots ,
but am going to install some other services and i have to repeat the same thing for each service
, what i want now is permanent configuration which runs automatically all the services under /etc/init.d at the boot time and i will not be in need to execute such above command for any new installed service ,
markkuk
24th November 2008, 05:54 PM
, what i want now is permanent configuration which runs automatically all the services under /etc/init.d at the boot time and i will not be in need to execute such above command for any new installed service ,
No, you really don't want any such program. Only those services that you actually need should be configured to start at boot, and only after you have made all necessary configuration.
LBCoder
25th November 2008, 01:26 AM
for FILE in `ls /etc/init.d`; do /sbin/chkconfig $FILE on; done
**** BUT DON'T DO IT!!!
Take a look at what is in the directory /etc/rc.d. Notice you have your init.d directory (/etc/init.d is actually just a symlink to /etc/rc.d/init.d), and you have a bunch of rcX.d directories. Each "X" is a runlevel (see "cat /etc/inittab"). Every time you start into runlevel 5, it runs all the "S*" scripts that are in /etc/rc.d/rc5.d. When it *leaves* runlevel 5, it runs all the "K*" scripts in the same directory. The "chkconfig" program creates symlinks in the various rcX.d directories to scripts in /etc/rc.d/init.d/.
marko
25th November 2008, 01:33 AM
Like post 7 says, chkconfig changes are persistent over boots.
If you want a nicer tool to setup services, try system-config-services
since it's a bit more efficient than chkconfig
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.