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

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
0
LocoTechCJ
Asked:
LocoTechCJ
  • 4
  • 4
  • 2
  • +1
2 Solutions
 
xDamoxCommented:
Hi,

You can find out where they all are by issuing:

rpm -ql httpd
0
 
xDamoxCommented:
Hi,

Also have a look at the apache .src.rpm as this will show you what command was issued to compile Apache.
0
 
Rance_HallCommented:
read man httpd.

if you run httpd -V you should get the version AND build parameters of the httpd binary.

That should tell you where it is looking for all the things it needs to find.

if its a compiled from source httpd as opposed to an rpm, you should just be able to use the same ./configure options as you find in the httpd -V output.

read the install docs to make sure the new version hasn't changed an option name, or added one you need.

and rpm upgrade from the same reposititory should be compiled with the same "not quite default" paths.

Rance
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
m1tk4Commented:
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?
0
 
LocoTechCJAuthor Commented:
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
0
 
Rance_HallCommented:
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.

 
0
 
xDamoxCommented:
Hi,

You should go through your httpd.conf file and check that the locations for the modules are in the correct location.
0
 
LocoTechCJAuthor Commented:
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.
0
 
xDamoxCommented:
Hi LocoTechCJ,

Get the Apache .src.rpm for redhat and have a go at rebuilding it.
0
 
LocoTechCJAuthor Commented:
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
0
 
LocoTechCJAuthor Commented:
Thanks for the help guys.  I guess I'll just start from scratch. I've been wanting to go virtual anyhow.  :)
 
LTCJ
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 4
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now