LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-04-2007, 12:08 PM   #1
nathank000
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: 0
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
 
Old 09-04-2007, 05:16 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Quote:
Originally Posted by nathank000 View Post
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.
 
Old 09-05-2007, 09:54 AM   #3
nathank000
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Original Poster
Rep: Reputation: 0
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?
 
Old 09-05-2007, 12:49 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
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.
 
Old 09-05-2007, 01:01 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,034

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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?
 
Old 09-06-2007, 05:09 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
Quote:
Originally Posted by tredegar View Post
Or am I missing something blindingly obvious here?
How would you manage the 2.0 httpd then?
 
Old 09-07-2007, 12:18 AM   #7
rnturn
Member
 
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 961

Rep: Reputation: 51
Quote:
Originally Posted by unSpawn View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Environment variable vedanu Programming 1 05-17-2007 08:20 AM
Global (shell) environment variable question Seventh Linux - Newbie 1 04-05-2007 04:18 PM
environment variable gamor Linux - Newbie 4 04-30-2005 06:28 PM
environment variable mimi Linux - Newbie 1 04-10-2002 09:29 AM
environment variable mimi Linux - General 2 04-10-2002 08:45 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration