1、インストール編集ツール
須藤はaptインストールのlibxml2-devのopensslののlibjpeg-devののlibpng-devのlibcurl4-opensslの-devののPKG-config設定libmcryptを-devの
2、ダウンロード元、ソースディレクトリにエキス(ダウンロード:https://www.php.net/releases/ 、検索5.5.38 )
wgetの https://www.php.net/distributions/php-5.5.38.tar.gz
タールzxf PHP-5.5.38.tar.gz
CDのPHP-5.5.38
./configure --prefix =は/ usr / local /のphp5.6 --with-CONFIG-ファイルパス=は/ usr / local / php5.6 /など--with-のMySQL = mysqlnd --with-mysqliの= mysqlnd - -with-PDO-mysqlの= mysqlnd --with-config設定ファイルスキャン-dirを=は/ usr / local / php5.6の/ etc --enable-インライン最適化--disable-デバッグ--disable-RPATH --enable -shared --enable-opcache --enable-FPM --with-FPMユーザ= WWWデータ--with-FPM基= WWWデータ--with-gettextの--with-iconvの--with-mcryptの - -with-はmhash --with-OpenSSLの--enable-bcmath --enable-石鹸--with-のlibxml-DIR --enable-PCNTL --enable-SHMOP --enable-sysvmsg --enable-MBSTRING --enable- --with-梨SYSVSEM --enable-SYSVSHM --enable-ソケット--withカール--with-GD --with-ZLIB --enable-ZIP
3、make installを&&作ります
PHP-FPMスタートアップファイルと設定ファイルのphp-fpm.confへの準備ができて4、
CDのPHP-5.5.38
cpはphp.iniの生産/usr/local/php5.5/etc/php.ini
CP牛/ FPM / init.d.php-FPM /etc/init.d/php5.5-fpm
chmodの+ X /etc/init.d/php5.5-fpm
CDの/usr/local/php5.5/etc/
CP /usr/local/php5.5/etc/php-fpm.conf.default PHP-fpm.conf
5、編集、構成ファイルには、タイムゾーンをphp.iniの
我々/usr/local/php5.5/etc/php.ini
; http://php.net/date.timezone
date.timezone = PRC
6、編集PHP fpm.confコンフィギュレーション・ファイル
[ルート@ localhostのPHP-5.5.38]#のCATは/ usr / local / php5.5の/ etc / PHP-fpm.conf
[グローバル]
PID = /usr/local/php5.5/var/run/php-fpm.pid
error_logに= /usr/local/php5.5/var/log/php-fpm.log
LOG_LEVEL =警告
[WWW]
聞く= 127.0.0.1:9002
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = WWW
listen.group = WWW
listen.mode = 0666
ユーザー= WWW
グループ= WWW
午後=ダイナミック
pm.max_children = 100
pm.start_servers = 50
pm.min_spare_servers = 30
pm.max_spare_servers = 80
request_terminate_timeout = 0
request_slowlog_timeout = 0
slowlog = VAR /ログ/ slow.log
図7は、nginxのPHP構成ファイルのPHP修正バージョンが実行されている選択された9002 fastcgi_passのポートを指定する
[ルート@ localhostのPHP-5.5.38] #猫は/ usr / local / nginxの/ confに/バーチャルホスト/ testadmin.conf
サーバ
{
80を聞きます。
SERVER_NAME testadmin.com;
indexindex.htmlのindex.php;
ルート/データ/ www /のテスト管理。
クローラ20 #limit_conn。
#error_page 404
場所〜* \。。(PHP | PHP5)$?
{
#fastcgi_pass UNIX:/tmp/php-cgi.sock。
fastcgi_pass 127.0.0.1:9002。
fastcgi_indexのindex.phpを。
includefastcgi.conf;
}
場所〜* \(GIF | JPG | JPEG | PNG | BMP | SWF)。。$
{
30dの有効期限が切れ;
}
場所〜* \(JS | CSS)。。$?
{
1時間の期限が切れます。
}
場所/ 5998153NginxStatus
{
stub_status上;
オフaccess_logの;
}
#access_logを/ dev / null;
error_logに/data/wwwlogs/error.log;
}
nginxの-t
nginxの:設定ファイルは/ usr / local / nginxの/ confに/ nginx.conf構文okです
nginxの:設定ファイルは/ usr / local / nginxの/ confに/ nginx.confテストは成功です
8、php5.5-FPMとnginxのを開始
サービスphp5.5-FPM開始
サービスnginxのリロード