Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

Apache Startup at Redhat9 bootup

Hi Mr.Hoffmann
How u doin? My query is that how can i make apache boot at startup of RHL 9. I downloaded apache 2.0.50 and its installed in lets say /home/usr/apache2/bin.I think i should do the following:

ln -s /home/usr/apache2/bin/httpd /etc/rc3.d/init.d/httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc3.d/httpd
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/httpd

Now when i try making these soft links,after executing the first command i get the error:
ln :`/etc/rc.d/init.d/httpd`: file exists
which is correct in fact.But this is the file for the Apache version which came as default with RHL 9.I want to start the version 2.0.50 which i downloaded and installed manually.How can i do that?
Regards
0
parvinderg
Asked:
parvinderg
1 Solution
 
samriCommented:
one easy trick would be to edit the file /etc/rc.d/init.d/httpd and adjust the location of apachectl accordingly.  

Locate the following line, and adjust the path accordingly, check you apache installation.  The path may vary depending on you build preference.

httpd=/usr/sbin/httpd
moduledir=/usr/lib/apache
0
 
UmeshCommented:

If apache is installed in /home/usr/apache2, and there will have the 'httpd' file inside /home/usr/apache2/bin/httpd

build a symbolic link to /etc/rc.d/init.d/  ( First check whether httpd is running, stop if it is.)


ln -s /home/usr/apache2/bin/httpd  /etc/rc.d/init.d/httpd

makeanother link to /etc/rc.d/rc3.d/ and /etc/rc.d/rc5.d
ln -s /etc/rc.d/init.d/httpd  /etc/rc.d/rc3.d/httpd
ln -s /etc/rc.d/init.d/httpd  /etc/rc.d/rc5.d/httpd

restart apache..

Hope This Helps!
0
 
parvindergAuthor Commented:
Thanks samri...
infact i had to start the httpd services too in the server settings as i had unclicked it previously as they were linked to the earlier version of Apache.
regards
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now