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