LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-05-2003, 10:13 AM   #1
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Rep: Reputation: 0
Remove apache2 (httpd)


Hi, I installed Red Hat linux 9, but I opted to not install apache 2 package when I installed RH. For some reason the apachectl file is still located in /sbin/. I have since installed apache 1.3 and it is located in /usr/local/apache/bin/apachectl . Is there some way to safely remove apache2 from /sbin so that there is no confusion in the future?

If I do
Code:
rpm -qa | grep apache
it returns nothing. But if I do
Code:
rpm-qa | grep httpd
it returns:
Code:
httpd-2.0.40-21
redhat-config-httpd-1.0.1-18
Can I just get rid of apache2 (httpd) by doing:
Code:
rpm -e 'httpd'
Is apache2 installed under the name httpd and apache 1.3 is installed under apachectl? I am also assuming nothing comes up when I grep for apache because I installed apache 1.3 from source (tar.gz), not as an rpm. I am new, so be gentle!

Jeremy

 
Old 08-05-2003, 10:38 AM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Of course,
if you installed the Apache 1.3 tarball (tar.gz), then it will not show up in the RPM database.
Using rpm -qa will only display RPM packages (.rpm) installed on your Linux.

If you want to remove Apache2, then remove httpd-2.0.40-21
So, in your case, you would type:
Code:
rpm -e httpd-2.0.40-21 redhat-config-httpd-1.0.1-18
 
Old 08-05-2003, 10:47 AM   #3
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
Do I need to check to make sure I am not causing any broken dependencies. I did a
Code:
rpm -e httpd-2.0.40-21 redhat-config-httpd-1.0.1-18 --test
and nothing came up, so I am assuming I am ok to remove it. Is it a major issue that 1.3 is installed in /usr/local/apache/bin/ and not /sbin? Thanks so much!

Jeremy
 
Old 08-05-2003, 10:49 AM   #4
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
I just removed both httpd packages and it gave me this response:
Code:
warning: /etc/rc.d/init.d/httpd saved as /etc/rc.d/init.d/httpd.rpmsave
Is this ok? It looks like it's just telling me that it won't initialize httpd to run anymore. Does this mean httpd (apache2) was running on startup before? I have apache1.3 running at start up now.

Jeremy
 
Old 08-05-2003, 11:09 AM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
It backup the Apache2 init script for some reason.
I don't know why.

If you look in the /etc/rc.d/init.d/httpd.rpmsave file and see a line like check for 1.3 configuration, then you know that it is the Apache2 init script.
You can delete it if you want.
 
Old 08-05-2003, 11:25 AM   #6
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
I just rebooted my machine after removing apache2, and now my apache1.3 doesn't start automatically. It used to start apache1.3 and mysql on startup. Does this have something to do with the httpd.rpmsave file? Here is my httpd.rpmsave file. I have a feeling this is my apache1.3 file. In fact, I am almost positive, because I remember changing the pidfile location to /usr/local/apache/ dir, whereas apache2 was in /sbin. What can I do to get apache1.3 back on startup?

Code:
#!/bin/sh
#
# Startup script for the Apache Web Server
#
# chkconfig: 345 85 15
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache/logs/httpd.pid
# Startup script for the Apache Web Server
#
# description: Apache is a World Wide Web server.  It is used to serve \
#              HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache/logs/httpd.pid
# config: /usr/local/apache/conf/access.conf
# config: /usr/local/apache/conf/httpd.conf
# config: /usr/local/apache/conf/srm.conf

# the location of the file that will be used to record the process
# id of the running apache server
PIDFILE=/usr/local/apache/logs/httpd.pid

# the location of the apache daemon binary
BINFILE=/usr/local/apache/bin/httpd

# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        echo -n "Starting httpd: "
        daemon $BINFILE
        echo
        touch /var/lock/subsys/httpd
        ;;
  stop)
        echo -n "Shutting down http: "
        [ -f "$PIDFILE" ] && {
            kill `cat "$PIDFILE"`
            echo -n httpd
        }
        echo
        rm -f /var/lock/subsys/httpd
        rm -f "$PIDFILE"
        ;;
  status)
        status "$BINFILE"
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  reload)
        echo -n "Reloading httpd: "
        [ -f "$PIDFILE" ] && {
            kill -HUP `cat "$PIDFILE"`
            echo -n httpd
        }
        echo
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|status}"
        exit 1
esac

exit 0
 
Old 08-05-2003, 11:28 AM   #7
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
I looked in my init.d/ directory and I saw another file "httpdVERSION2" that I created and in it is the checking 1.3 configuration line. I did a
Code:
cp httpd.rpmsave httpd
so hopefully that will fix it. I am rebooting now. Does this make a sensible fix? Thanks!
 
Old 08-05-2003, 11:36 AM   #8
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
Nope, it didn't work. apache 1.3 still doesn't start up automatically. Any thoughts? Do I need to add all those K15 and S15 files to the rc1.d, rc6.d directories? I don't understand how all that works anyway...

I ran ntsysv and it doesn't show httpd anymore. I am assuming httpd (1.3) is no longer a service. Thanks for any help!
 
Old 08-06-2003, 07:20 AM   #9
jermo5
LQ Newbie
 
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10

Original Poster
Rep: Reputation: 0
I got it working. I did
Code:
chkconfig --add httpd
then added it to 3+5=on. Thanks!

Jeremy
 
  


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
Remove apache2? freakin'me Linux - Software 3 08-13-2005 11:01 AM
Apache2 #httpd -l won't work peterchin Linux - Software 1 02-24-2005 01:49 PM
Apache2 #httpd -l won't worik peterchin Linux - General 0 02-23-2005 05:01 PM
HTTPD server problems redhat 9 apache2 R Audano Linux - Networking 1 01-02-2005 03:53 PM
how to remove httpd-2.0.40-21 on RH9 icepig Linux - Software 2 11-21-2003 04:41 PM


All times are GMT -5. The time now is 08:24 PM.

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