源碼安裝php-5.6.30.tar.gz

來源:互聯網
上載者:User

標籤:php   虛擬機器   作業系統   軟體包   php-fpm   

作業系統:CentOSrelease 6.8 (Final)

虛擬機器:VMware

PHP軟體包:php-5.6.30.tar.gz

安裝步驟如下:

[[email protected] tools]# tar zxf php-5.6.30.tar.gz

[[email protected] tools]# cd php-5.6.30

[[email protected] tools]#

wget http://cn.php.net/distributions/php-5.6.30.tar.gz

[[email protected] php-5.6.30]#yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devellibiconv-devel -y #安裝相關的lib軟體包

[[email protected] php-5.6.30]#yum install freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devellibxslt-devel –y   #安裝相關的lib軟體包

[[email protected] php-5.6.30]#./configure \

--prefix=/application/php-5.6.30 \

--with-mysql=/application/mysql \

--with-iconv-dir=/usr/local/libiconv \

--enable-fpm \

--enable-mbstring \

 --with-mcrypt \

 --with-gd \

 --with-openssl \

 --with-mhash \

 --enable-pcntl \

 --enable-sockets \

 --with-xmlrpc \

 --enable-zip \

 --enable-short-tags \

 --enable-static \

 --with-xsl \

 --with-fpm-user=nginx \

 --with-fpm-group=nginx \

--enable-opcache=no

設定軟連結:#ln -s /application/php-5.6.30/  /application/php

拷貝PHP設定檔到PHP預設目錄: cp php.ini-production  /application/php/lib/php.ini

配置php-fpm.conf檔案:cp php-fpm.conf.default  php-fpm.conf

啟動php服務php-fpm, 命令列:/application/php/sbin/php-fpm

檢查php服務php-fpm的進程及連接埠的情況,命令如下:

[[email protected] nginx]# ps -ef|grep php-fpm

root     12228     1  0 13:42 ?        00:00:00 php-fpm: master process (/application/php-5.6.30/etc/php-fpm.conf)

nginx    12229 12228  0 13:42 ?        00:00:00 php-fpm: pool www            

nginx    12230 12228  0 13:42 ?        00:00:00 php-fpm: pool www            

root     12301  1708  0 14:01 pts/1    00:00:00 grep php-fpm

[[email protected] nginx]# lsof -i :9000

COMMAND   PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

php-fpm 12228  root    7u  IPv4 195435      0t0  TCP localhost:cslistener (LISTEN)

php-fpm 12229 nginx    0u  IPv4 195435      0t0  TCP localhost:cslistener (LISTEN)

php-fpm 12230 nginx    0u  IPv4 195435      0t0  TCP localhost:cslistener (LISTEN)


本文出自 “sky9890” 部落格,請務必保留此出處http://sky9896.blog.51cto.com/2330653/1932749

源碼安裝php-5.6.30.tar.gz

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.