LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   possible environment variable question. (https://www.linuxquestions.org/questions/linux-newbie-8/possible-environment-variable-question-582120/)

nathank000 09-04-2007 11:08 AM

possible environment variable question.
 
I had a couple of consultants install Subversion on our servers to help us keep track of some running projects. Little did i know that Subversion installed the apache httpd ver 2.0, which I DO NOT want to use, which brings me to my issue:

simply typing HTTPD on my system, the server thinks I am talking about the ver 2.0 of apache, not the version I want to use. This carries through with cPanel, so anytime cpanel does anything with apache - it does so with the ver 2.0 that was installed with subversion.

How do I change the systems understanding of the command "httpd" so it points to another version of apache?
is that some sort of environment variable?

Thanks in advance,
-nathan

unSpawn 09-04-2007 04:16 PM

Quote:

Originally Posted by nathank000 (Post 2880915)
simply typing httpd on my system, the server thinks I am talking about the ver 2.0 of apache, not the version I want to use.

If you execute httpd with the full path prepended it would.

nathank000 09-05-2007 08:54 AM

Is this an environment var?
 
I have no problem working with the full path to the command, but when I use cpanel/WHM - it only issues the httpd command. Is there any way to change what the reference to httpd is on the system?

unSpawn 09-05-2007 11:49 AM

No, it's not an environment variable, it's how the elements in root's $PATH are searched for matching items. Say the PATH is set to "/bin:/usr/local/bin", now if you have a binary "httpd" in both directories the one in /bin would be found first. You can see and test that typing "which -a httpd". About Cpanel/WHM I don't know, maybe it could work if you explicitly set the PATH in it's startup script to how you want it.

tredegar 09-05-2007 12:01 PM

When you type which httpd the system will tell you which one it is using. Suppose the output is /bin/httpd, and this is the apache version 2.0 that you do not want to use.
Can't you just rename /bin/httpd to something else and then make a symlink so /bin/httpd points to the version you do want to use? Or am I missing something blindingly obvious here?

unSpawn 09-06-2007 04:09 PM

Quote:

Originally Posted by tredegar (Post 2882163)
Or am I missing something blindingly obvious here?

How would you manage the 2.0 httpd then?

rnturn 09-06-2007 11:18 PM

Quote:

Originally Posted by unSpawn (Post 2883652)
How would you manage the 2.0 httpd then?

Well, you could set up an account to "own" and manage the Apache 2.x" software and modify it's PATH to find the Apache 2 binaries. Also, you'd probably want to tweak a bunch of settings in the configuration file(s) so that the two versions kept log files and such in separate directories. Yuk.


All times are GMT -5. The time now is 12:10 AM.