Apache upgrade problem


I just bought a dedicated server from godaddy, which was running Apache 2.2.3.  I tried to upgrade to Apache 2.2.17 (the latest version), and I would up confused.  

What I gathered from the install is that I now have Apache 2.2.17, but when I went to restart Apache at /usr/local/apache2/bin/apachectl restart    I got this error:

httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

Also, when I check to see what version is currently running (httpd -v), it says it's still 2.2.3.

Does anyone know what's going on here?
Who is Participating?
darrickhartmanConnect With a Mentor Commented:
I'm assuming you did a source install and did not update using yum.

I would uninstall the newly compiled version of apache.  You're likely to run into other issues with php if you compiled your own version of apache and php from source.  It's a very tricky process and rarely worth the effort.

You should first try updating using yum.  If that does not get you to the version of apache (and presumably php) that you want, look at a third-party yum repository which has the version you want.  rpm-fusion is a good option.  Atomic Corp also has a repository which has current apache and php versions.
legolasthehansyConnect With a Mentor Commented:
Try stopping the old apache instance,
service httpd stop
or kill -9 <apache process ID>
Now start your new apache instance.

darren-w-Connect With a Mentor Commented:
try using :
/etc/init.d/apache2 status
ps aux| grep httpd
to check the status of the service.

you should get something like:  * Apache is running (pid 4153). if it is running

another shortcut would be:

sudo  /etc/init.d/apache2 status

you can you stop/start/restart to control the service,

if its not you may have something else running on the port


sudo lsof -iTCP:80

to see what is using the port
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

How did you install the new version?  If you did the install from source, you might have installed the new version in a separate location (perhaps /usr/local) instead of the original location.
chaseiveyAuthor Commented:
I just looked and , yes, the new installation looks to be in /usr/local.  I think the old one is /usr/sbin.  I have an apachectl file in both of those locations.  How does this affect things?

legolasthehansy & darren-w,
I haven't had a chance to try your solutions yet.  I will be back at the comp today and will at that time.
chaseiveyAuthor Commented:
Thanks for your answers, guys.  At the moment I'm running into even more problems than this. :(
How exactly do I upgrade with yum?

Also, in the /etc/httpd/conf/httpd.conf file, what EXACTLY is the default <Files> tag supposed to read?
One of my other servers deletes a line of this file everytime I uninstall it.  Currently, mine reads:

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all

Should there be a "satisfy all" clause in there as well?  Please advise. :)

The <Files> entry looks fine.  That's just preventing anyone from accessing your .htaccess and .htpasswd files.  

You should remove the new source based install.

Then, do
yum update httpd

Open in new window

chaseiveyAuthor Commented:
got it.  
What is the best way to remove the new install?
Unfortunately apache does not have a 'make uninstall' option (at least not that I'm aware of).  You'll have to manually delete the files in /usr/local/bin (or /usr/local/sbin) and the modules which should also be in some directory structure under /usr/local/
chaseiveyAuthor Commented:
It looks like everything from the new install went here : /usr/local/apache2
I can't seem to find anything in /usr/local/bin OR /usr/local/sbin (I ran ls commands on each)

Do you think just removing the /usr/local/apache2 directory would do it?
yes. that should remove it.
chaseiveyAuthor Commented:
and since I'm new to linux, would this be the appropriate command?

rm -rf /usr/local/apache2/
chaseiveyAuthor Commented:

I removed the Apache2 directory.

Then I ran yum update httpd.

Here's what happened:
addons                                                   |  951 B     00:00    
base                                                     | 2.1 kB     00:00    
extras                                                   | 1.1 kB     00:00    
updates                                                  | 1.9 kB     00:00    
Setting up Update Process
No Packages marked for Update

httpd -v still shows 2.2.3  any ideas?
Is there any particular reason you really want/need the newer version?  If 2.2.3 is the latest one in the CentOS repository, it's the stable release that they and Redhat are recommending.

chaseiveyAuthor Commented:
i think you're right.  I just saw on one forum that Coldfusion 9 (the app server I'm using) recommends Apache 2.2.11 or higher.   There are some issues connecting Apache and Coldfusion as it is.   I think I can get around it though.   Thanks for your help.
No problem.  If you really do need a newer version, you can enable the Atomic Yum repository and do a yum update.  That will grab the newer version that they publish (along with several other web-related updates--php etc).  It's safe to use on a CentOS server.  

wget -q -O - http://www.atomicorp.com/installers/atomic.sh | sh
yum update

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.