LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-16-2005, 10:39 AM   #1
mabus92920
Member
 
Registered: Jan 2005
Posts: 48

Rep: Reputation: 15
apache upgrade


I need some help here... I have recently installed apache 2.0.50 on my redhat 9. Now, the server runs perfectly but the thing is my "apachectl" command refers to the old version installed. How do I uninstall my old apache to make the command refer to the new one???

i can run the newly installed apache without any errors, but I have to put in the complete path to apachectl,.. what I want to do is to make the command work like the old version.. where you can just type it anywhere you are..
 
Old 01-16-2005, 09:43 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Sounds like you put the executables in a nonstandard place (?) You could remove executable permissions on the old apachectl and add the directory containing the new apachectl to your PATH.
 
Old 01-16-2005, 10:36 PM   #3
mabus92920
Member
 
Registered: Jan 2005
Posts: 48

Original Poster
Rep: Reputation: 15
ok..so how do I do that ? can you give me some samples ? I'll have to put that under .bashrc right ?

would it be PATH=/usr/local/apache2/bin/apachectl:$PATH ? ????
 
Old 01-16-2005, 11:26 PM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You have two apachctl files with paths something like /path/to/old/apachectl and /path/to/new/apachectl. First remove execute permissions from the first:
Code:
chmod a-x /path/to/old/apachectl
Now to modify your PATH, you should have something similar to the following in whatever startup file you use (e.g. .profile):
Code:
export PATH=$PATH:/path/to/new
which in your case means
Code:
PATH=$PATH:/usr/local/apache2/bin
 
Old 01-18-2005, 06:58 AM   #5
mabus92920
Member
 
Registered: Jan 2005
Posts: 48

Original Poster
Rep: Reputation: 15
ah ic.. thanks for that man... that really helped me.. I just got one more question? where do I edit those PATH? .barshrc or .bashrc_profile (under home) ?? or the global one??
 
Old 01-18-2005, 11:41 AM   #6
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You have to use one of the editors. I use vi, which takes a while to learn to use well. I hear talk of something called nano being recommended as easy. Maybe someone else can say a word about this.
 
Old 01-18-2005, 12:06 PM   #7
mabus92920
Member
 
Registered: Jan 2005
Posts: 48

Original Poster
Rep: Reputation: 15
yes.. I know abou the editors.. I could use vi or pico on that. What I mean was which file am I supposed to edit???



anyway.. thanks for the replies man.. you really helped me here.
 
Old 01-18-2005, 12:41 PM   #8
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You're welcome. No trouble at all. It's probably best not to mess around with the global files, especially in this case where very few people -- probably only root -- will be using the apachectl command. So, consider only editing the local files.

You can put the PATH=$PATH:/usr/... statement in your .bashrc, but since .bashrc isn't read by a login shell, create a .bash_profile containing the following:
Code:
source ./.bashrc
The above files should be created under the home directory of each user who needs to use the apachectl command (without having to type its full path).
 
Old 01-18-2005, 08:08 PM   #9
mabus92920
Member
 
Registered: Jan 2005
Posts: 48

Original Poster
Rep: Reputation: 15
ok..thanks for that man.. Ey, I posted a new thread about ODBC.. I hope you can help me with that.
 
  


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
Apache upgrade Spyiish Slackware 11 11-04-2004 12:12 PM
Mandrake 10 upgrade Apache igbe Mandriva 6 09-17-2004 08:21 PM
apache upgrade 2.0.46 to 2.0.48 xfurious_mindx Linux - Software 0 03-10-2004 06:46 PM
Apache upgrade 1.3.27 to 1.3.28 (HELP!) thebrothaulv2h8 Linux - Software 0 09-10-2003 12:40 PM
After RH 8.0 upgrade need to restore Apache 1.3 ericcarlson Linux - Software 0 03-12-2003 09:33 AM


All times are GMT -5. The time now is 12:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration