Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

Linux 環境下安裝 Nginx、PCRE、zlib 與 OpenSSL

Nginx 是高並發、低記憶體佔用的 Web 伺服器。編譯時常需要 PCRE、OpenSSL 與 zlib。

PCRE

tar -zxvf pcre-8.10.tar.gz
cd pcre-8.10
./configure
make
make install

OpenSSL

tar -zxvf openssl-1.0.0a.tar.gz
cd openssl-1.0.0a
./config
make
make install

Nginx

tar -zxvf nginx-0.8.53.tar.gz
cd nginx-0.8.53
./configure --with-http_stub_status_module --with-http_ssl_module --with-openssl=/usr/local/openssl-1.0.0a --with-http_gzip_static_module
make
make install
Linux 環境下安裝 Nginx、PCRE、zlib 與 OpenSSL

也可將 pcre、zlib、openssl 原始碼直接編譯進 Nginx,避免啟動時動態載入。

./configure --prefix=/data/nginx --with-pcre=/data/download/pcre-8.20 --with-openssl=/data/download/openssl-1.0.0a --with-http_ssl_module --with-zlib=/data/download/zlib-1.2.5
make
make install
Copyright © Linux教程網 All Rights Reserved