下载安装php 5.4.36
cn2.php.net/distributions/php-5.4.36.tar.bz2
解压
tar jxvf php-5.4.36.tar.bz2
cd php-5.4.36
配置编译参数
./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-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
安装发生故障
configure: error: jpeglib.h not found.
解决方法:
yum -y install libjpeg-devel
继续编译参数
故障:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决:
rpm -ivh "http://www.lishiming.net/data/attachment/forum/epel-release-6-8_32.noarch.rpm"
查看由哪个包安装
yum list | grep -i mcrypt
ibmcrypt.i686 2.5.8-9.el6 epel
libmcrypt-devel.i686 2.5.8-9.el6 epel
libtomcrypt.i686 1.17-21.el6 epel
libtomcrypt-devel.i686 1.17-21.el6 epel
libtomcrypt-doc.noarch 1.17-21.el6 epel
mcrypt.i686 2.6.8-10.el6 epel
php-mcrypt.i686 5.3.3-4.el6 epel
安装包:
yum -y install libmcrypt-devel
继续编译参数
编译并安装
make
make install
在这最好使用echo $?来测试下成功与否
编译安装完成后可以查看下有哪些目录文件
ls /usr/local/php/
bin etc include lib php
查看静态编译的模块
/usr/local/php/bin/php -m-------->列出
/usr/local/php/bin/php -i-------->查看
cn2.php.net/distributions/php-5.4.36.tar.bz2
解压
tar jxvf php-5.4.36.tar.bz2
cd php-5.4.36
配置编译参数
./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-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
安装发生故障
configure: error: jpeglib.h not found.
解决方法:
yum -y install libjpeg-devel
继续编译参数
故障:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决:
rpm -ivh "http://www.lishiming.net/data/attachment/forum/epel-release-6-8_32.noarch.rpm"
查看由哪个包安装
yum list | grep -i mcrypt
ibmcrypt.i686 2.5.8-9.el6 epel
libmcrypt-devel.i686 2.5.8-9.el6 epel
libtomcrypt.i686 1.17-21.el6 epel
libtomcrypt-devel.i686 1.17-21.el6 epel
libtomcrypt-doc.noarch 1.17-21.el6 epel
mcrypt.i686 2.6.8-10.el6 epel
php-mcrypt.i686 5.3.3-4.el6 epel
安装包:
yum -y install libmcrypt-devel
继续编译参数
编译并安装
make
make install
在这最好使用echo $?来测试下成功与否
编译安装完成后可以查看下有哪些目录文件
ls /usr/local/php/
bin etc include lib php
查看静态编译的模块
/usr/local/php/bin/php -m-------->列出
/usr/local/php/bin/php -i-------->查看
编辑回复