Solved

Apache upgrade problem

Posted on 2010-11-29
16
715 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
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
 

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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now