B 4. how to install and configure the RPM Package is bundled with apache, php3, and MySQL in many Linux releases. since MySQL is distributed in RPM format, therefore, the installation has been described above. The following describes only the installation and configuration of apache and php. This article is based on RedHatLinux6.1. Set SyntaxH in PHP
B> 4. how to install and configure the RPM Package
Apache, php3, and MySQL are bundled in many Linux releases. since MySQL is distributed in RPM format, the installation has been described above, the following describes only the installation and configuration of apache and php. This article is based on RedHat Linux 6.1. PHP designers do not recommend configuring php3 from RPM, but it will solve this problem in php4. Since re-configuring from RPM and installing php are troublesome, the following methods are for reference only.
1. the rpm file you need
To reconfigure and compile php, you should download the source code rpm of php3: php-3.0.12.6.src.rpm. This package generates the following rpm:
Php-3.0.12-6.i386.rpm php-manual-3.0.12-6.i386.rpm
Php-imap-3.0.12-6.i386.rpm php-ldap-3.0.12-6.i386.rpm
Php-pgsql-3.0.12-6.i386.rpm
Before installing the new rpm, you should first delete the php software package:
Rpm-e php-imap php-ldap php-pgsql php-manual
The following software packages are required to re-compile php:
Apache-devel
Postgresql-devel
MySQL-devel
2. reconfigure, compile, and install php3
Install the php3 source code package:
Rpm-I php-3.0.12-6.src.rpm
It installs the php source code in the/usr/src/redhat Directory, enters the directory, and configures and compiles the following command:
Cd/usr/src/redhat/SPECS
Vi php. spec
Edit the php. spec file, find the % build section, and add the following to the./configure options section:
With-mysql =/usr