Solved

Apache upgrade problem

Posted on 2010-11-29
16
719 Views
Last Modified: 2012-05-10
Hello,

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 0.0.0.0:80
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?
0
Comment
Question by:chaseivey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 11

Assisted Solution

by:legolasthehansy
legolasthehansy earned 25 total points
ID: 34236312
Try stopping the old apache instance,
service httpd stop
or kill -9 <apache process ID>
Now start your new apache instance.

Regards,
Lego
0
 
LVL 13

Assisted Solution

by:darren-w-
darren-w- earned 25 total points
ID: 34236992
try using :
/etc/init.d/apache2 status
OR
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

use

sudo lsof -iTCP:80
 

to see what is using the port
0
 
LVL 7

Expert Comment

by:darrickhartman
ID: 34243186
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.
0
Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

Author Comment

by:chaseivey
ID: 34243650
darrickhartman,
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.
0
 
LVL 7

Accepted Solution

by:
darrickhartman earned 200 total points
ID: 34243745
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.
0
 

Author Comment

by:chaseivey
ID: 34244278
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
</Files>

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

Expert Comment

by:darrickhartman
ID: 34244347
chaseivey,

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


http://www.centos.org/docs/5/html/yum/
0
 

Author Comment

by:chaseivey
ID: 34244423
got it.  
What is the best way to remove the new install?
0
 
LVL 7

Expert Comment

by:darrickhartman
ID: 34244439
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/
0
 

Author Comment

by:chaseivey
ID: 34244469
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?
0
 
LVL 7

Expert Comment

by:darrickhartman
ID: 34244496
yes. that should remove it.
0
 

Author Comment

by:chaseivey
ID: 34244504
and since I'm new to linux, would this be the appropriate command?

rm -rf /usr/local/apache2/
0
 

Author Comment

by:chaseivey
ID: 34244654
ok.

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?
0
 
LVL 7

Expert Comment

by:darrickhartman
ID: 34245062
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.

0
 

Author Comment

by:chaseivey
ID: 34245450
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.
0
 
LVL 7

Expert Comment

by:darrickhartman
ID: 34245461
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

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question