首页 > 代码库 > 安装 PHP

安装 PHP

yum install -y epel-release
yum install -y libmcrypt-devel libxml2-devel openssl openssl-devel bzip2 bzip2-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel
cd /usr/local/srcwget http://cn2.php.net/distributions/php-5.4.36.tar.gztar zxvf php-5.4.36.tar.gzcd php-5.4.36./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
make
make install
cp php.ini-production /usr/local/php/etc/php.ini

 

 

 

 

    

 

 

 

 

 

     

安装 PHP