php官網(wǎng):http://www.php.net/
成都創(chuàng)新互聯(lián)專注于企業(yè)營(yíng)銷型網(wǎng)站建設(shè)、網(wǎng)站重做改版、永平網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5頁(yè)面制作、購(gòu)物商城網(wǎng)站建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營(yíng)銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為永平等各大城市提供網(wǎng)站開(kāi)發(fā)制作服務(wù)。
php-fpm #要啟動(dòng)php-fpm服務(wù),有端口,端口號(hào)9000
lamp的php不用啟動(dòng),它的工具是apxs,而lnmp中的php-fpm用的工具是enable-fpm
pnp-fpm和nginx單獨(dú)跑一個(gè)服務(wù)
cd /usr/local/src/
wgethttp://cn2.php.net/distributions/php-5.6.19.tar.gz
tar zxvf php-5.6.19.tar.gz
cd php-5.6.19
#因?yàn)榫幾g的時(shí)候需要很多相關(guān)的包,都是with進(jìn)去的,所以先下載好
yum install -y gcc
yum install -y libxml2-devel
yum install -y curl-devel
yum install -y libjpeg-devel
yum install -y libpng libpng-devel
yum install -y freetype freetype-devel
#下面是匯總
yum install -y libxml2-devel curl-devellibjpeg-devel libpng libpng-devel freetype freetype-devel
wget http://www.lishiming.net/data/p_w_upload/forum/epel-release-6-8_32.noarch.rpm
rpm -ivh epel-release-6-8_32.noarch.rpm
yum install -y libmcrypt-devel
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-MySQL=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --with-curl
make && make install #make的時(shí)間比較長(zhǎng)
useradd -s /sbin/nologin php-fpm #編譯指定的用戶和組
cp php.ini-production/usr/local/php/etc/php.ini #拷貝php.ini配置文件
mv /usr/local/php/etc/php-fpm.conf.default/usr/local/php/etc/php-fpm.conf #php-fpm配置文件,啟動(dòng)腳本的變量
cp sapi/fpm/init.d.php-fpm/etc/init.d/php-fpm
chmod 755 /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
/etc/init.d/php-fpm start