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

Instructions to upgrade Apache

Hello

I'm thinking of installing Apache via source, because I don't know how to get the fine control I need (individually disable certain modules and enable others, choose which directories things end up in, get any possible speed gains by compiling for my processor, etc) via an rpm-based install (but I'll give the points to anyone who can show me).

So I'll build my config file, and make, etc, and all will be fine, but what happens when I want to upgrade?  

If I grab the new source, I can use the same config file, and make, make install, but will it overwrite my existing install without overwriting my website?  Will it overwrite my painstakingly configured httpd.conf?

Lastly, how can I make my source install start automatically?  I'm sure it's something in the rc world, but does that need to be re-done after each upgrade as well?

Thanks for your help

E
0
edmund_mitchell
Asked:
edmund_mitchell
1 Solution
 
laurent69Commented:
Hi,

If you didn't really choice your Linux Version, you should  adopt debian one. Nothings is more easy on debian, just by doing: apt-get upgrade apache, then you get the last stable version, you keep your conf file, etc...

I've forgotten the RedHat command, just watch the man on rpm.

1) First find your httpd.conf, you should find it around /etc/apache.
2) copy all your config files in a temp directory
3) Upgrade with rpm command
4) It should works, and you have nothing to be worry about your website, the only files touch, should be the conf file
and of course, binary and modules.

It should put the stop/start file in the rcX.d directory

Or watch in the inittab file to check your initdefault runlevel.

Regards.

Laurent.
0
 
linxitCommented:
Hi,

You just need to be cautious when upgrading a source-compiled version, i.e. take a copy of your httpd.conf just to be on the safe side.

The default DocumentRoot is /usr/local/apache/htdocs, so the install will create an index.html there. However, its unlikely that's where your real website is so no problems with the website being overwritten.

With source-compiled Apache, the start/stop commands are different from the Red Hat RPM.

To start, run /usr/local/apache/bin/apachectl start

If you put this command in /etc/rc.local it will start automatically on boot.

Andy
0
 
heskyttbergCommented:
Hi!

I would strongly recommend against compiling it by your own in redhat.

You would have to do this first rpm -e apache, this might delete your httpd.conf.

If you just want compiled speed download the RedHat apache.src package and do a rpm --rebuild

This will still give a RH binary but with som optimisations.

The final built package will be found in /usr/src/redhat/

There is SPEC, SRC BUILD and so on I think the final package can be found under BUILD.

If you really want to hack now, you can go into SPEC dir edit the apache.spec or if it is httpd.spec and change any of the configure parameters.

Then do cd .. ; rpm -some switch SPEC/httpd.spec

Now you will get RPM files with your own build specifications.

Isn't this great.

As far as loading unloading modules the RedHat apache RPM is well built this is just done in the beginning of httpd.conf.

For the option to rebuild using the spec file do man rpm, it will be displayed in there I don't remeber, but I have done this with a few packages.

Hope this helps.

Regards
/Hans - Erik Skyttberg
0
 
edmund_mitchellAuthor Commented:
That's the ticket.  Many thanks for a very useful answer.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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