LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How do you change what the /usr/sbin/service program runs? (https://www.linuxquestions.org/questions/red-hat-31/how-do-you-change-what-the-usr-sbin-service-program-runs-205083/)

launchcode 07-14-2004 05:17 PM

How do you change what the /usr/sbin/service program runs?
 
I have a RedHat 9 server, it's to be used for web stuff only - so I don't have X installed on it. I have successfully compiled and installed the latest versions of Apache and PHP - but the /usr/sbin/service command which I was using to start/stop the httpd service is pointing to the old version of Apache.

What script do I need to change to make it point to the correct (new) version of Apache?

Thanks.

Rich

RobertP 07-14-2004 06:52 PM

Version 2+ of apache is called httpd on some distros. The old version is called apache.
service httpd start

launchcode 07-14-2004 06:58 PM

Thanks for the reply, but that wasn't really what I needed help with :)

I know how to use the service command, I use it all the time - what I wasn't sure of was how to make it work with a different installation of Apache. I use PHP so I use Apache 1.3, not 2 as it isn't as stable. I found out how to do it in the end - I just needed to modify the scripts in the rc.d directory and comment out a function that checked to see if the httpd.conf was a 1.3 version or not (which of course it would be!). Just pointed the paths to my new apachectl and all is well now.

Cheers,

Rich

RobertP 07-16-2004 01:18 PM

If you have both apache 1.3 and 2.X installed, you would have both apache and httpd showing in /etc/rc/d/init.d

You could uninstall the one you do not want or mark the script not executable.


All times are GMT -5. The time now is 12:09 PM.