LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 11:08 AM   #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, 04:16 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 08: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, 11:49 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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, 12:01 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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, 04:09 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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-06-2007, 11:18 PM   #7
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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



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 07:20 AM
Global (shell) environment variable question Seventh Linux - Newbie 1 04-05-2007 03:18 PM
environment variable gamor Linux - Newbie 4 04-30-2005 05:28 PM
environment variable mimi Linux - Newbie 1 04-10-2002 08:29 AM
environment variable mimi Linux - General 2 04-10-2002 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration