Install PHP under Linux

Source: Internet
Author: User

Install PHP under CentOS6.5

1, continue to enter the/USR/LOCAL/SRC directory and download the PHP installation package

[Email protected] ~]# cd/usr/local/src/

[Email protected] src]# wget http://am1.php.net/distributions/php-5.3.27.tar.gz


2. Decompression

[Email protected] src]# tar zxf php-5.3.27.tar.gz


3. Configuring and Compiling parameters

[Email protected] src]# CD php-5.3.27

Before compiling the parameters, download the library file:

[email protected] php-5.3.27]# Yum install-y libxml2-devel

[email protected] php-5.3.27]# Yum install-y OpenSSL openssl-devel

[email protected] php-5.3.27]# Yum install-y bzip2 bzip2-devel

[email protected] php-5.3.27]# Yum install-y freetype freetype-devel

[email protected] php-5.3.27]# Yum install-y libpng libpng-devel

If you are missing any library files just follow the prompts and download them with Yum


[Email protected] php-5.3.27]#/configure \

>--prefix=/usr/local/php \

>--WITH-APXS2=/USR/LOCAL/APACHE2/BIN/APXS \

>--WITH-CONFIG-FILE-PATH=/USR/LOCAL/PHP/ETC \

>--with-mysql=/usr/local/mysql \

>--with-libxml-dir \

>--WITH-GD \

>--with-jpeg-dir \

>--with-png-dir \

>--with-freetype-dir \

>--with-iconv-dir \

>--with-zlib-dir \

>--with-bz2 \

>--with-openssl \

>--with-mcrypt \

>--enable-soap \

>--enable-gd-native-ttf \

>--enable-mbstring \

>--enable-sockets \

>--enable-exif \

>--disable-ipv6

The following configuration is successful:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/75/D8/wKiom1ZDRgHBx6OiAAAlH0AB3c0273.png "title=" 0QC2JZJ2%{{B) WCE8 (h6]e1.png "alt=" Wkiom1zdrghbx6oiaaalh0ab3c0273.png "/>


4. Compiling

[[email protected] php-5.3.27] #make


5. Installation

[[email protected] php-5.3.27] #make Install


Done!





This article is from the "10694514" blog, please be sure to keep this source http://10704514.blog.51cto.com/10694514/1711957

Install PHP under Linux

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.