码迷,mamicode.com
首页 > Web开发 > 详细

Linux——搭建PHP开发环境第一步:PHP

时间:2016-10-17 22:51:39      阅读:242      评论:0      收藏:0      [点我收藏+]

标签:

原文链接:http://www.2cto.com/os/201511/450258.html

##### PHP 编译安装 ####

[root@localhost ~]# yum install libxml2-devel curl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel net-snmp net-snmp-devel
 
 
[root@localhost src]# wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
[root@localhost src]# tar zxvf libiconv-1.14.tar.gz
[root@localhost src]# cd libiconv-1.14
[root@localhost libiconv-1.14]# ./configure --prefix=/usr/local/php/libiconv
[root@localhost libiconv-1.14]# make && make install
 
 
[root@localhost src]# wget http://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
[root@localhost src]# tar zxvf libmcrypt-2.5.8.tar.gz
[root@localhost src]# cd libmcrypt-2.5.8
[root@localhost libmcrypt-2.5.8]# ./configure
[root@localhost libmcrypt-2.5.8]# make && make install
 
 
[root@localhost libltdl]# /sbin/ldconfig && cd libltdl/
[root@localhost libltdl]# ./configure --enable-ltdl-install
[root@localhost libltdl]# make && make install
 
 
[root@localhost src]# wget http://nchc.dl.sourceforge.net/project/mhash/mhash/0.9.9.9/mhash-0.9.9.9.tar.gz
[root@localhost src]# tar zxvf mhash-0.9.9.9.tar.gz
[root@localhost src]# cd mhash-0.9.9.9
[root@localhost mhash-0.9.9.9]# ./configure
[root@localhost mhash-0.9.9.9]# make && make install
 
[root@localhost src]# wget http://nchc.dl.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz
[root@localhost src]# tar zxvf mcrypt-2.6.8.tar.gz
[root@localhost src]# cd mcrypt-2.6.8
[root@localhost mcrypt-2.6.8]# /sbin/ldconfig && export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH
[root@localhost mcrypt-2.6.8]# ./configure 
[root@localhost mcrypt-2.6.8]# make && make install
 
 
[root@localhost src]# wget http://cn2.php.net/distributions/php-5.6.15.tar.gz
[root@localhost src]# tar zxvf php-5.6.15.tar.gz
[root@localhost src]# cd php-5.6.15
 
[root@localhost php-5.6.15]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc  --with-iconv=/usr/local/php/libiconv --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gd --with-jpeg-dir --with-png-dir --with-pear --with-freetype-dir --with-zlib --with-libxml-dir --with-iconv-dir --with-xmlrpc --with-mhash --with-mcrypt --with-curl --with-openssl --with-snmp --with-gettext --enable-pdo --enable-mbstring --enable-ctype --enable-simplexml --enable-ftp --enable-sockets --enable-gd-native-ttf --enable-sysvsem --enable-exif --enable-sysvshm --enable-xml --enable-dom --enable-simplexml --enable-shmop --enable-zip --enable-mbregex --enable-bcmath --enable-inline-optimization --enable-soap
 
[root@localhost php-5.6.15]# make && make install
 
[root@localhost php-5.6.15]# cp php.ini-production /usr/local/php/etc/php.ini
[root@localhost ~]# ln -s /usr/local/php/bin/* /usr/sbin/

  

//查看版本

php -v

Linux——搭建PHP开发环境第一步:PHP

标签:

原文地址:http://www.cnblogs.com/xj76149095/p/5971513.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!