ホームページ >バックエンド開発 >PHPチュートリアル >centos7でnginxをインストール
nginx をインストールします
インストール パッケージをダウンロードします
http://nginx.org/ja/download.html 最新の nginx-1.9.6.tar.gz をダウンロードします
centos 7 /usr/local に入れます
tar -zxvf nginx- を解凍します1.9 .6.tar.gz
nginx ディレクトリを作成します mkdir /usr/local/nginx
解凍ディレクトリに入力します cd /usr/local/nginx-1.9.6
nginx をインストールします
次に、 --prefix パラメータを使用してインストールします。 nginx がインストールされているディレクトリを指定し、make、make install インストール
./configure $デフォルトのインストールは /usr/local/nginx にあります
エラー メッセージがある場合: ./configure: error: HTTP キャッシュ モジュール OpenSSL ライブラリからの md5 関数を必要とします --without-http-cache オプションを使用してモジュールを無効にするか、OpenSSL ライブラリをシステムにインストールするか、または nginx を使用してソースから OpenSSL ライブラリを静的に構築することができます。 using
--with-http_ssl_module --with- openssl=
解決策:
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx
引き続きインストール
make
make install
nginx
の起動コマンドは:/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf再起動
/usr/local/nginx/sbin/ nginx -s
reload
上記は、必要な内容を含む centos7 への nginx のインストールを紹介しています。PHP チュートリアルに興味のある友人に役立つことを願っています。