• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 723
  • Last Modified:

Apache upgrade problem

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
chaseivey
Asked:
chaseivey
3 Solutions
 
legolasthehansyCommented:
Try stopping the old apache instance,
service httpd stop
or kill -9 <apache process ID>
Now start your new apache instance.

Regards,
Lego
0
 
darren-w-Commented:
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
 
darrickhartmanCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
chaseiveyAuthor Commented:
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
 
darrickhartmanCommented:
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
 
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
</Files>

Should there be a "satisfy all" clause in there as well?  Please advise. :)
0
 
darrickhartmanCommented:
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
 
chaseiveyAuthor Commented:
got it.  
What is the best way to remove the new install?
0
 
darrickhartmanCommented:
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
 
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?
0
 
darrickhartmanCommented:
yes. that should remove it.
0
 
chaseiveyAuthor Commented:
and since I'm new to linux, would this be the appropriate command?

rm -rf /usr/local/apache2/
0
 
chaseiveyAuthor Commented:
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
 
darrickhartmanCommented:
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
 
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.
0
 
darrickhartmanCommented:
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now