Upgrading Apache

Like MySQL, upgrading or rebuilding Apache follows the same process as installing the software in the first place. Windows users have the benefit of an installer application, which will automatically detect the previous version, remove core components, and install new ones. It will, however, retain existing configuration files. You are responsible for upgrading any other version-specific modules, such as mod_ssl, which are tied to specific versions of Apache.

For Linux/Unix users, the process also follows the same path as the original installation. When you unpack your new distribution, it will create a directory named with the new version number. For example, if your previous version was 2.0.51 and you are upgrading to 2.0.52, your directories will be named httpd-2.0.51 and httpd-2.0.52, respectively.

The actual installation directory for Apache is determined by you, when you run the configure script; for example,

 # ./configure --prefix=/usr/local/apache2 

After running the configure script in order to build the new version of Apache, just go through the make and make install process as you did when installing Apache in the first place.

Now, should you want to install your new version of Apache directly over your old version, you caneven with the old httpd binary still running. Just be sure to back up your configuration files, in case something goes awry. However, if you are more comfortable installing your new version in a different directory, that's fine, tooyou'll just have to move all your Web-related files (that is, everything in the document root) to the new directory, and make all appropriate edits to your fresh, new httpd.conf file. Whichever method you choose is up to you; one method just requires more file movement and reconfiguration than the other.

After upgrading Apache on Linux/Unix, you should also rebuild your PHP module. Windows users do not have a module to rebuild, but should ensure the appropriate PHP-related changes are still present in the httpd.conf file, related to loading the module residing in the PHP directory tree.

Modifying Apache Without Upgrading

Suppose you need to add or remove functionality from Apache but you are not upgrading to a new minor version. An example would be to add a new module or to upgrade the version of OpenSSL used on your system.

In this case, Linux/Unix users should go to the existing source directory (such as httpd-2.0.52) and type make clean at the prompt. This will, essentially, reset the makefiles so that you can rebuild Apache without relying on previous, cached values. After the make clean command, run the configure script with your new parameters, and go through the make and make install process again. You would not need to rebuild the PHP module in this situation.

Windows users would activate the pre-built modules using the instructions provided in Chapter 3, "Installing and Configuring Apache."

Sams Teach Yourself PHP MySQL and Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (4th Edition)
ISBN: 067232976X
EAN: 2147483647
Year: 2003
Pages: 333
Authors: Julie Meloni

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net