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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-05-2003, 11:13 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Rep:
|
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:
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
|
|
|
08-05-2003, 11:38 AM
|
#2
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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
|
|
|
08-05-2003, 11:47 AM
|
#3
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
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
|
|
|
08-05-2003, 11:49 AM
|
#4
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
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
|
|
|
08-05-2003, 12:09 PM
|
#5
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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.
|
|
|
08-05-2003, 12:25 PM
|
#6
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
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
|
|
|
08-05-2003, 12:28 PM
|
#7
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
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!
|
|
|
08-05-2003, 12:36 PM
|
#8
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
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!
|
|
|
08-06-2003, 08:20 AM
|
#9
|
LQ Newbie
Registered: Aug 2003
Location: Philadelphia
Distribution: Red Hat
Posts: 10
Original Poster
Rep:
|
I got it working. I did
Code:
chkconfig --add httpd
then added it to 3+5=on. Thanks!
Jeremy
|
|
|
All times are GMT -5. The time now is 11:29 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|