Link to home
Start Free TrialLog in
Avatar of luyan
luyan

asked on

start Apache automaticlly in Redhat Linux 4.0

Hi,
I have installed Apache in my Redhat ES 4.0, which is located in /usr/local/apache2.
Please help me make it start automatically.
the manual start command is
./apachectl start

Thanks,
Yan
Avatar of arrkerr1024
arrkerr1024
Flag of United States of America image

Any reason you didn't install it from an RPM?  That would have set up all of the startup scripts for you automatically.

For your situation:
ln -s /usr/local/apache2/bin/apachectl  /etc/init.d/httpd

Then edit apachectl and add this to the top
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve HTML files and CGI.
This makes the script redhat compatible.

then "chkconfig httpd on" to make it start on boot (and shut down automatically too).
Avatar of Tintin
Tintin

Did you uninstall the version of Apache that comes with ES4 first?
Avatar of luyan

ASKER

All,
Sorry for the late response. these days is too busy.
I did not uninstall Apache comes with ES4.

Arrkerr1024,
I canot do the link, ln -s /usr/local/apache2/bin/apachectl  /etc/init.d/httpd, because there is httpd in the folder. I have delete it and created a link.
And for this part,
Then edit apachectl and add this to the top
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  It is used to serve HTML files and CGI.
Do I need remove the # sign?
And I can not find httd with command chkconfig --list.

Thanks,
Yan
Did you want to have the two versions of Apache installed?

Is there any reason you didn't want to use the Apache version that comes with ES4?
Avatar of luyan

ASKER

No, I don't want to have 2 versions of apache installed? But our application installed on the second Apache.

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of luyan

ASKER

I like to stick on the ES4 version too but there is impossible to switch back for now.