11.10 安装PHP5
1. wget http://au1.php.net/distributions/php-5.6.36.tar.gz //下载安装包
2. tar -jxvf php-5.6.32.tar.bz2 //解压文件
3. ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --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
//初始化php
configure: error: xml2-config not found. Please check your libxml2 installation.
解决办法: yum install libxml2-devel
configure: error: Cannot find OpenSSL's
解决办法 : yum install openssl-devel
configure: error: Please reinstall the BZip2 distribution
解决办法: yum install bzip2-devel
configure: error: jpeglib.h not found.
解决办法: yum iinstall libjpeg-devel
configure: error: png.h not found.
解决办法: yum install libpng-devel
configure: error: freetype-config not found.
解决办法:yum install freetype-devel
configure: error: mcrypt.h not found. Please reinstall libmcrypt
解决办法: yum install epel-release
yum install libmcrypt-devel
make //
install make //
4. /usr/local/php/bin/php -m //查看加载的模块
php是作为apache扩展模块存在的,不需要启动