
nginx-Installationsabhängigkeitspaket
(Empfohlenes Lernen: nginx-Tutorial)
nginx-Installationsabhängigkeit Paket GCC, openssl-devel, pcre-devel und zlib-devel Softwarebibliotheken.
Vollständiger Name von Pcre (Perl-kompatible reguläre Ausdrücke), chinesische Perl-kompatible reguläre Ausdrücke, offizielle Website von pcre.
1 2 | yum install pcre pcre-devel -y
yum install openssl openssl-devel -y
|
Nach dem Login kopieren
Kompilierungsbefehl
1 2 3 4 5 6 7 | tar -zxf nginx-1.10.1.tar.gz
cd nginx-1.10.1/
./configure --prefix=/data/nginx-1.10.1 --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module
useradd nginx -M -s /sbin/nologin
make && make install
ln -s /data/nginx-1.10.1 /data/nginx
|
Nach dem Login kopieren
Testen Sie, ob die Nginx-Konfigurationsdatei normal ist
1 2 3 | /data/nginx/sbin/nginx -t
nginx: the configuration file /data/nginx-1.10.1/conf/nginx.conf syntax is ok
nginx: configuration file /data/nginx-1.10.1/conf/nginx.conf test is successful
|
Nach dem Login kopieren
Starten Sie den Nginx-Server
1 2 3 4 | /data/nginx/sbin/nginx -t ##检查配置文件
/data/nginx/sbin/nginx ##确定nginx服务
netstat -lntup |grep nginx ## 检查进程是否正常
curl http:
|
Nach dem Login kopieren
Das obige ist der detaillierte Inhalt vonNginx-Installationsabhängigkeitspaket. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!