本文採用老男孩老師的書--跟老男孩學Linux維之Web叢集實戰的安裝步驟,由於環境採用Nginx+php ,所以編譯PHP時,採用FPM模式,須開啟:--enable-fpm。 2、編譯PHP
# wget -O /etc/yum.repos.d/CentOS-Base.repo # wget -O /etc/yum.repos.d/epel.repo # yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel libcurl-devel -y # yum install freetype-devel libpng-devel gd-devel libxslt-devel -y # mkdir /software # mkdir /usr/local/libiconv # wget -O /software/libiconv-1.14.tar.gz http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz# cd /software
# tar -zxvf libiconv-1.14.tar.gz # cd libiconv-1.14 # ./configure --prefix=/usr/local/libiconv # make && make install# yum install libmcrypt-devel -y # yum install mhash -y # yum install mcrypt -y
3、環境初始化-php-fpm
# cd /software # wget -O /software/php-5.3.27.tar.gz http://cn2.php.net/get/php-5.3.27.tar.gz/from/this/mirror #下载php-5.3.27# tar -zxvf php-5.3.27.tar.gz # cd /software/php-5.3.27
以上是詳解PHP5.3.27編譯安裝的範例程式碼的詳細內容。更多資訊請關注PHP中文網其他相關文章!