Installing PHP 3.x.x from CVS Source for Apache 1.x.x on Linux
by Nathan Wallace
(Nov 2, 1999)
This document describes how to install PHP
on Linux. The installation is being done from the latest PHP code as stored in the CVS repository. Specifically, these instructions were written using Red Hat
6.1, Apache 1.3.9 and PHP 3.0.12+.
You should have Apache installed before trying to install PHP. Here are my Apache installation instructions.
If you want to use PHP with MySQL then you must install MySQL first.
Before we Begin
- These instructions assume that you have Apache installed according to my instructions. That installation is done into /usr/local/etc/httpd and /www.
- You must be logged in as root to perform this installation.
Getting the CVS Tree
- The Concurrent Versions System is a tool for version control. We are about to connect to the main PHP development tree and download the latest version of the code. Be careful, this will get the current development version, not a production release. You should only use the CVS version of the code if you have a good reason to do so, mine is that I need XML support which is currently broken in 3.0.12.
- We will install in the same place as our Apache and existing PHP installations. You do not need to have installed PHP before to use the CVS version.
- You need to have CVS installed on your machine. It is available from . First we need to specify the location of the CVS tree and login. You will need internet access to do this and all other cvs commands:
cvs -d :pserver:email@example.com:/repository login
When prompted enter the password of:
- Now we can get the latest version of the CVS tree. This will create a directory called php3, so you might want to make sure that one does not already exist.
cvs -z3 -d :pserver:firstname.lastname@example.org:/repository checkout php3
- Now we'll create a symbolic link to the php3 directory, just for consistency with our other installations:
ln -s php3 php
Getting Ready to Build PHP from CVS
- First let's get where the action is:
- When compiling from CVS you need to build the configure script:
Compiling, Installing and Testing
The remainder of the installation is identical to the process ftp php distribution. I didn't want to duplicate the steps, so click here to continue