?
Solved

Apache upgrade problem

Posted on 2010-11-29
16
Medium Priority
?
721 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 100 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 100 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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 800 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

Stack Overflow Podcast - Frustrating Miracles

In this podcast, Stack Overflow interviewed Linux Academy CEO/Founder, Anthony James, and got his developer story!

"Follow your passion, be prepared to work hard and sacrifice, and, above all, don't let anyone limit your dreams."  - Donovan Bailey

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…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

770 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