Link to home
Start Free TrialLog in
Avatar of LocoTechCJ
LocoTechCJFlag for United States of America

asked on

Apache upgrade on odd installation

I am needing to upgrade Apache from 2.0.46 to 2.0.59.  I have recently started managing a server which has Apache on Red Hat, but the install paths are not quite default.  I have a general idea where some of the files are such as the .conf files and httpd, but I don't know where ALL install paths are.   Also, I know that I should use the config.nice file to upgrade across minor versions, but that file doesn't exist on this server.  Is there any way to display the layout of the current install paths, and once that is figured out, how do I upgrade using them without the config.nice without breaking all of the current configurations?  

Thanks
LTCJ
ASKER CERTIFIED SOLUTION
Avatar of xDamox
xDamox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Also have a look at the apache .src.rpm as this will show you what command was issued to compile Apache.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If your current Apache is a stock RedHat RPM, you can just upgrade using up2date - all configuration tweaks will survive.

You can tell if that's the case by running

rpm -q httpd

or locating your apache executable and running

rpm -qf (filename)

. If you find that your Apache is custom-build through make/install, the sources are probably somewhere still on the server and chances are you can find the configure parameters there.

In RedHat, the standard way of building is --prefix=/usr as a configure parameter. However, there are very FEW cases when you actually need to rebuild Apache from the scratch.



Can you tell a little bit more about how the previous version was built?
Avatar of LocoTechCJ

ASKER

Ok, so I was able to list all file locations using your suggestion, xDamox.  Thanks.  And Rance, I know about httpd -V, which is how I knew where the httpd and .conf files were, unfortunately the configure options doesn't show any options to set the server_root.  SO, I decided to use the information that I knew (and found out using xDamox's suggestion) and I configured the layout file to match my file locations, with were very close to the default RedHat layout.  Then I ran ' ./configure --with-layout=RedHatMod ' where RedHatMod was the name of the Layout I created in the layout config file... and of course I ran make and make install.  Now I have more problems.   Where before, doing a httpd -V showed the server root as /etc/httpd, it now shows /usr/local/apache2 and the webserver will not start at all, giving errors finding the httpd.conf.  When I try to manually start the server, adding the httpd.conf path, I get errors that several modules will not load, "undefined symbol".  Any ideas?  Thanks for the assistance.  Had the previous admin left the source files (and logs) it may have been a lot easier than this.

LTCJ
Avatar of Rance_Hall
Rance_Hall

you current problems likely have to do with your old configuration telling apache to load modules from locations where they no longer exist in a format compatible with the newly compiled binary.

That doesnt mean that the modules are there, it just means that the newly built ones are likely somewhere else.

some of the rpm management commands that are elsewhere in this ticket would have told you if your apache was installed via rpm, or src rpm, or from source directly

you should be able to alter your configuration file to look for things in their new correct location and that should fix your problem for now.

but my chief concern is that you now have two copies of apache on the system, one old, and one new, instead of an upgrade, which is what you wanted.

 
Hi,

You should go through your httpd.conf file and check that the locations for the modules are in the correct location.
Thanks xD, but earlier I found that many of the modules are built in that were previously loaded in the httpd.conf, which was causing many of the errors.  I have since restored the old version of apache, and I'm open to other suggetstions for "manually" updating apache.
Hi LocoTechCJ,

Get the Apache .src.rpm for redhat and have a go at rebuilding it.
I've noticed that with the default apache layout, the "HTTPD_ROOT" is /usr/local/apache2 whereas with the Red Hat layout it seems that the "HTTPD_ROOT" is /etc/httpd.   I see this by running the httpd -V.  How is this set to begin with??  Nothing in the configure options says anything about the "HTTPD_ROOT" and using a layout setting doesn't seem to change it.

LTCJ
Thanks for the help guys.  I guess I'll just start from scratch. I've been wanting to go virtual anyhow.  :)
 
LTCJ