Install PHP in RedHatLinux5

Source: Internet
Author: User
The differences between Linux and Windows are too great. When installing windows programs, I only care about configuration, while Linux requires you to care about every detail. installing PHP5 in RedHatLinux5 has two problems: libxml2 does not install mysqlheader and PHP installation script. /configure -- prefix =/usr/local/php5 -- with-config-file-pa

The differences between Linux and Windows are too great. When installing windows programs, I only care about configuration, while Linux requires you to care about every detail.

Installing PHP5 in RedHat Linux 5 has two problems.

Libxml2 Is Not Installed

Mysql header Not Installed

PHP installation script

./Configure -- prefix =/usr/local/php5

-- With-config-file-path =/usr/local/lib

-- With-apxs2 =/usr/apache/httpd/bin/apxs

-- With-mysql =/usr/include/mysql

Make

Make install


======================================

The first problem is that libxml2 is not installed. You can only find the system disk and find the rpm installation in the Server directory.

 

Ls * libxml *
/* Find these two useful packages, libxml2-2.6.23-1.2.i386.rpm libxml2-devel-2.6.23-1.2.i386.rpm */
Rpm-ivh libxml2-2.6.23-1.2.i386.rpm
/* Prompt that I have already installed */
Rpm-ivh libxml2-devel-2.6.23-1.2.i386.rpm

Follow the prompts to install the dependent rpm

Continue executing the PHP installation script.

Prompt

==================================

Configure: error: Cannot find MySQL header files under/usr/include/mysql.
Note that the MySQL client library is not bundled anymore!

======================================

Dizzy ah, I initially download mysql only download the server and client, do not know MySQL-devel-community-5.1.57-1.rhel5.i386.rpm is also useful drops

I had to download the package to apache again and install it.

Execute the PHP installation script again

It seems that the installation is successful.

Related Article

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.