Datasheet

P1: KTX
WY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44
Chapter 1
Installing PHP5 with Linux and Apache
At the time of this writing, the very rst release candidate of PHP5 was available, and thats the one were
using. But you may want to check the PHP site for more recent versions, and any notes about changes.
The combination of Linux, Apache, MySQL, and PHP is probably the most common production
environment for running PHP Web servers. This combination of open-source software has been referred
to by the acronym LAMP. If you run the same combination of software, you can benetfromthe
experiences of the many other people whove used this setup.
The PHP developers work very closely with the Apache and MySQL teams to ensure that advances in the
three server systems are fully supported by the other components. However, at the time of this writing
PHP5 is being distributed with SQLite rather than MySQL, because there is some concern about whether
MySQL is still open source. This may not be a concern when you read this and begin developing, but its
worth noting.
Choosing Your Installation Method
As with other open-source software, you have the option of downloading the PHP and Apache source
code (which, in both cases, is written in the C programming language) and compiling the programs
yourself. If that sounds daunting (its not actually as scary as it sounds), you can obtain precompiled
versions in one of two forms: binary downloads, which are precompiled versions of the software that
typically come with installation scripts to put all the required pieces into the necessary parts of your le
system, and binary packages, which are available for systems that have a software package management
system, such as the Red Hat Package Manager (RPM) for Linux, and are the easiest to install.
Heres a quick overview of the three methods:
Installation Method Advantages Disadvantages
Source Most exible solution for
custom installations. Additional
tests and examples are included
in the source distribution
Needs to be compiled. Slightly
more difcult than the other
options. Harder to remove once
its been done
Binary (compiled) No need to mess around with
trying to compile the server.
Takes less time to install
Less exible than doing an
installation from source
Binary RPMs Fastest and easiest installation
method. Very easy to uninstall
or upgrade later
Must be using an RPM-based
Linux distribution such as Red
Hat. Least exible installation
method
An RPM Installation of PHP4
The version of Red Hat were using is actually called Fedora, because Red Hat has split off development
into two parts: Fedora and the enterprise version of Red Hat Linux. Currently, the Fedora site doesnt
6