1831346 Members
3076 Online
110024 Solutions
New Discussion

STARTUP SCRIPTS

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

STARTUP SCRIPTS

Can someone tell me how to make mysql and apache startup automatically at bootup time? I am running @init5
UNIX IS GOOD
2 REPLIES 2
Claudio Cilloni
Honored Contributor
Solution

Re: STARTUP SCRIPTS

# chkconfig --list

this shows the status of your services at boot time for each run level.

# chkconfig --add httpd
# chkconfig --add mysql

this adds apache and mysql services (if they weren't show by chkconfig --list)

# chkconfig --level 5 httpd on
# chkconfig --level 5 mysql on

this starts these services at run level 5.

Ciao
Claudio
Francesco Sarno
Frequent Advisor

Re: STARTUP SCRIPTS

You can also add in /etc/rc5.d/ a symbolic link to /etc/init.d/mysqld

/etc/rc5.d/>ln -s /etc/init.d/mysqld S99mysql
/etc/rc5.d/>ln -s /etc/init.d/httpd S99http

In that directory there are other link to other services and the number after S (start) indicates the order in which the servise start.
You can also do this in run level 3,if you want.

For stopping than service when you reboot or halt the machine you must add symbolic link in /etc/rc0.d/ e /etc/rc6.d/ whit this command :

/etc/rc0.d/>ln -s /etc/init.d/mysqld K99mysql
/etc/rc0.d/>ln -s /rtc/init.d/httpd K99http

in same way in /etc/rc6.f/ directory.

Bye,F.