PHP installation tips linux 2

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.