编译安装php-5.5.15
一、环境
系统:CentOS 6.4x64
IP: 192.168.3.48
二、安装基础软件包
[root@lnmp-test ~]# yum install zlib libxml libjpeg freetype libpng gd curl libiconv zlib-devel libxml2-devel libxslt-devel libjpeg-devel freetype-devel libpng-devel gd-devel curl-devel bzip2 bzip2-devel -y
三、安装libiconv
#下载软件 [root@lnmp-test ~]# wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz [root@lnmp-test ~]# tar xf libiconv-1.14.tar.gz [root@lnmp-test ~]# cd libiconv-1.14 [root@lnmp-test libiconv-1.14]# ./configure --prefix=/usr/local/libiconv [root@lnmp-test libiconv-1.14]# make && make install
四、安装libmcrypt
#下载软件 [root@lnmp-test ~]# wget http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz/download [root@lnmp-test ~]# tar xf libmcrypt-2.5.8.tar.gz [root@lnmp-test ~]# cd libmcrypt-2.5.8 [root@lnmp-test libmcrypt-2.5.8]# ./configure [root@lnmp-test mhash-0.9.9.9]# make && make install #配置软链接信息 [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmcrypt.la /usr/lib/libmcrypt.la [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmcrypt.so /usr/lib/libmcrypt.so [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4 [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmcrypt.so.4.4.8 /usr/lib/libmcrypt.so.4.4.8 [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash.a /usr/lib/libmhash.a [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash.la /usr/lib/libmhash.la [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash.so /usr/lib/libmhash.so [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2 [root@lnmp-test mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash.so.2.0.1 /usr/lib/libmhash.so.2.0.1
五、安装mcrypt
#下载软件 [root@lnmp-test ~]# wget http://sourceforge.net/projects/mcrypt/files/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz/download [root@lnmp-test ~]# tar xf mcrypt-2.6.8.tar.gz [root@lnmp-test ~]# cd mcrypt-2.6.8 [root@lnmp-test mcrypt-2.6.8]# /sbin/ldconfig [root@lnmp-test mcrypt-2.6.8]# ./configure [root@lnmp-test mcrypt-2.6.8]# make && make install [root@lnmp-test mcrypt-2.6.8]# /sbin/ldconfig
六、安装php
#下载php软件 [root@lnmp-test ~]# wget http://cn2.php.net/distributions/php-5.5.24.tar.gz [root@lnmp-test php-5.5.24]# ./configure > --prefix=/usr/local/php-5.5.24 > --with-config-file-path=/usr/local/php-5.5.24/etc > --enable-fpm > --with-fpm-user=www > --with-fpm-group=www > --with-mysql=mysqlnd > --with-mysqli=mysqlnd > --with-pdo-mysql=mysqlnd > --with-iconv-dir=/usr/local/libiconv > --with-freetype-dir > --with-jpeg-dir > --with-png-dir > --with-zlib > --with-libxml-dir=/usr > --enable-xml > --disable-rpath > --enable-bcmath > --enable-shmop > --enable-sysvsem > --enable-inline-optimization > --with-curl > --enable-mbregex > --enable-mbstring > --with-mcrypt > --enable-ftp > --with-gd > --enable-gd-native-ttf > --with-openssl > --with-mhash > --enable-pcntl > --enable-sockets > --with-xmlrpc > --enable-zip > --enable-soap > --with-gettext > --disable-fileinfo > --with-kerberos [root@lnmp-test php-5.5.24]# make ZEND_EXTRA_LIBS=‘-liconv‘
本文出自 “ly36843运维” 博客,请务必保留此出处http://ly36843.blog.51cto.com/3120113/1651176
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。