1. PHP インストール パッケージをダウンロードします
http://cn2.php.net/get/php-5.5.36.tar.gz/from/this/mirror
デフォルトでは、Nginx と PHP の間に接続はありません。 Apache PHP はコンパイル後にモジュール ファイルを生成しますが、Nginx PHP は実行可能ファイルを生成するために PHP を必要とするため、Nginx と PHP を統合するには fastcgi テクノロジを使用する必要があります。これはインストール時にのみ有効にする必要があります。今回はFastCGIを使用するだけでなく、PHP-FPMのようなものを使用してPHPをインストールしました。 端的に言えば、PHP-FPMはPHPのプラグインとして存在します。 PHP をインストールするには、PHP-FPM をパッチの形式で PHP にインストールする必要があります。また、PHP は PHP-FPM のバージョンと一致している必要があります。これは必須です。
2. インストール
[root@localhost src]# <span style="color: #0000ff;">tar</span> -zxvf php-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span>.<span style="color: #0000ff;">tar</span><span style="color: #000000;">.gz [root@localhost src]# cd php</span>-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span><span style="color: #000000;"> [root@localhost php</span>-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span>]# ./configure --prefix=/usr/local/php --with-config-<span style="color: #0000ff;">file</span>-path=/usr/local/php/etc --with-png-<span style="color: #0000ff;">dir</span>=/usr/local/libpng --with-jpeg-<span style="color: #0000ff;">dir</span>=/usr/local/jpeg --with-freetype-<span style="color: #0000ff;">dir</span>=/usr/local/freetype --with-zlib-<span style="color: #0000ff;">dir</span>=/usr/local/zlib --with-mcrypt=/usr/local/libmcrypt --with-libxml-<span style="color: #0000ff;">dir</span>=/usr/local/libxml2/ --with-iconv-<span style="color: #0000ff;">dir</span>=/usr/local/libiconv --enable-libxml --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-opcache --enable-mbregex --enable-fpm --enable-mbstring=all --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-<span style="color: #0000ff;">zip</span> --enable-soap --without-pear --with-gettext --enable-session --with-curl --enable-ctype --enable-shared --with-<span style="color: #000000;">gd [root@localhost php</span>-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span>]<span style="color: #0000ff;">make</span><span style="color: #000000;"> clean [root@localhost php</span>-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span>]<span style="color: #0000ff;">make</span><span style="color: #000000;"> [root@localhost php</span>-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span>]<span style="color: #0000ff;">make</span> <span style="color: #0000ff;">install</span>
3. ソースコード内の php.ini-development を php.ini
の検索パスにコピーします。[root@localhost php-<span style="color: #800080;">5.5</span>.<span style="color: #800080;">36</span>]# <span style="color: #0000ff;">cp</span> php.ini-development /usr/local/php/etc/php.ini
4. php-fpm 構成ファイルをコピーし、php-fpm.conf という名前を付けます (パス /usr/local/php/etc の下)
[root@localhost etc]# <span style="color: #0000ff;">cp</span> php-fpm.conf.default php-fpm.conf
5. php-fpm を起動します
[root@localhost /]# /usr/local/php/sbin/php-<span style="color: #000000;">fpm [root@localhost </span>/]# <span style="color: #0000ff;">ps</span> aux | <span style="color: #0000ff;">grep</span> php-<span style="color: #000000;">fpm root </span><span style="color: #800080;">7790</span> <span style="color: #800080;">0.0</span> <span style="color: #800080;">0.2</span> <span style="color: #800080;">27300</span> <span style="color: #800080;">3048</span> ? Ss <span style="color: #800080;">22</span>:<span style="color: #800080;">23</span> <span style="color: #800080;">0</span>:<span style="color: #800080;">00</span> php-fpm: master process (/usr/local/php/etc/php-<span style="color: #000000;">fpm.conf) nobody </span><span style="color: #800080;">7791</span> <span style="color: #800080;">0.0</span> <span style="color: #800080;">0.4</span> <span style="color: #800080;">27300</span> <span style="color: #800080;">4380</span> ? S <span style="color: #800080;">22</span>:<span style="color: #800080;">23</span> <span style="color: #800080;">0</span>:<span style="color: #800080;">00</span> php-<span style="color: #000000;">fpm: pool www nobody </span><span style="color: #800080;">7792</span> <span style="color: #800080;">0.0</span> <span style="color: #800080;">0.2</span> <span style="color: #800080;">27300</span> <span style="color: #800080;">2524</span> ? S <span style="color: #800080;">22</span>:<span style="color: #800080;">23</span> <span style="color: #800080;">0</span>:<span style="color: #800080;">00</span> php-<span style="color: #000000;">fpm: pool www root </span><span style="color: #800080;">8124</span> <span style="color: #800080;">0.0</span> <span style="color: #800080;">0.0</span> <span style="color: #800080;">4420</span> <span style="color: #800080;">756</span> pts/<span style="color: #800080;">3</span> S+ <span style="color: #800080;">23</span>:<span style="color: #800080;">19</span> <span style="color: #800080;">0</span>:<span style="color: #800080;">00</span> <span style="color: #0000ff;">grep</span> php-fpm
添付ファイル:
1. PHP 構成ファイルのパスを見つけます
[root@localhost /]# /usr/local/php/bin/php --<span style="color: #000000;">ini Configuration File (php.ini) Path: </span>/usr/local/php/<span style="color: #000000;">etc Loaded Configuration File: </span>/usr/local/php/etc/<span style="color: #000000;">php.ini Scan </span><span style="color: #0000ff;">for</span> additional .ini files <span style="color: #0000ff;">in</span><span style="color: #000000;">: (none) Additional .ini files parsed: (none)</span>
2. php-fpm を閉じます
[root@localhost /]# <span style="color: #0000ff;">killall</span> php-fpm
3. PHP コア構成オプションのリスト
http://php.net/manual/zh/configure.about.php

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

Dreamweaver Mac版
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

SublimeText3 Linux 新バージョン
SublimeText3 Linux 最新バージョン

WebStorm Mac版
便利なJavaScript開発ツール

SecLists
SecLists は、セキュリティ テスターの究極の相棒です。これは、セキュリティ評価中に頻繁に使用されるさまざまな種類のリストを 1 か所にまとめたものです。 SecLists は、セキュリティ テスターが必要とする可能性のあるすべてのリストを便利に提供することで、セキュリティ テストをより効率的かつ生産的にするのに役立ちます。リストの種類には、ユーザー名、パスワード、URL、ファジング ペイロード、機密データ パターン、Web シェルなどが含まれます。テスターはこのリポジトリを新しいテスト マシンにプルするだけで、必要なあらゆる種類のリストにアクセスできるようになります。
