Ubuntuシステム下のNgixサーバソフトウェアのインストール時のよくあるエラー解決

1628 ワード

Ngixの設置問題
ダウンロードnginx、アドレス:http://nginx.org/en/download.html
解圧設置、これは説明しません。
問題が発生しました

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.

解決1:

sudo apt-get install libpcre3 libpcre3-dev
問題が発生しました

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib= option.
解決2:
zlibライブラリをダウンロードします。アドレス:http://www.zlib.net/
直接解凍設置

which zlib
確認してください。インストールが必要かもしれません。

sudo apt-get install openssl libssl-dev
configur操作を実行:

./configure �Cprefix=/usr/local/nginx �Cpid-path=/var/run/nginx.pid--with-http_stub_status_module �Cwith-http_ssl_module

make
make install

起動:

/usr/local/nginx/sbin/nginx
テスト:

curl -i http://localhost

クリーンアンマウント
コマンド:

sudo apt-get --purge autoremove nginx
コマンド:

which nginx
ヒントがなければ、アンインストール成功を証明します。