PHP企業實戰安裝步驟

來源:互聯網
上載者:User

標籤:php安裝指令

安裝lib庫

yum install zlib-devel libxml2-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel -y


下載libiconv包

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar xf libiconv-1.14.tar.gzcd libconv-1.14./configure --prefix=/usr/local/libiconvmakemake install

設定epel源

wget -O /etc/yum.repos.d/epel.repo

安裝libmcrypt庫、安裝加密擴充庫mhash、安裝mcrypt擴充庫、安裝libxstl-devel

yum install libmcrypt libmcrypt-devel mhash mhash-devel mcrypt libxstl-devel -y


PHP編譯指令

./configure --prefix=/application/php5.3.27 --with-mysql=/application/mysql --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-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp

在Make之前建立軟串連,否則可能報錯

ln -s /application/mysql/lib//libmysqlclient.so.18 /usr/lib64makemake install

建立PHP的軟串連

ln -s /application/php.5.3.27 /application/php

配置PHP.INI檔案(從安裝目錄中複製ini檔案模版。結尾是development是用於開發的,production是用於生產環境的)

cd ~/php.5.3.27cp php.ini-production /application/php/lib/php.ini

配置PHP服務(fastcgi模式)設定檔php-fpm.conf

cd /application/php/etccp php-fpm.conf.default php-fpm.conf

修改必要的參數後啟動php-fpm

/application/php/sbin/php-fpm

檢查啟動的進程(一個主進程,16個子進程,在php-frm.conf中配置)

ps -ef|grep php-fpm|grep -v grep            #查看進程ps -ef|grep php-fpm|grep -v grep|wc -l      #檢查進程數

查看連接埠(連接埠預設9000)

netstat -lntup|grep php-fpmss -lntup|grep php-fpm


PHP企業實戰安裝步驟

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.