1. Vorbereitung vor der Installation
1 Installieren Sie das Kompilierungstool (nginx muss vor der Installation kompiliert werden).
yum install -y gcc gcc-c++
2 Installieren Sie PCRE
#2.1下载
wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz
#2.2 解压
tar -zxvf pcre-8.35.tar.gz
#2.3进入目录
cd pre-8.35
#2.4配置
./configure
#2.5 安装配置
make && make install
3 Installieren Sie die SSL-Bibliothek
cd /opt/software
wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -zxvf openssl-1.0.1j.tar.gz
# 4.配置
./configure
# 5.编译安装
make && make install
4 Installieren Sie die zlib-Bibliothek
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz -C ../module/
cd zlib-1.2.11/
./configure
make && make install
5 Laden Sie Nginx herunter
get https://nginx.org/download/nginx-1.16.1.tar.gz
cd nginx-1.16.1/
./configure --prefix=nginx-1.16.1/ --with-http_stub_status_module --with-http_ssl_module --with-pcre=../pcre-8.35/
make && make install
6. Starten Sie Nginx:
cd /opt/software/nginx-1.16.1/nginx-1.16.1/sbin
./nginx
Zweitens, Konfiguration