執行 make 報錯
make: *** No rule to make target build, needed by default. Stop.
解決方式:
更新yum
yum update
更新完成后,先刪除之前准備make的nginx包,然后重新解壓一個。
安裝前置庫:
[root@cqakserver local]# yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel
刪除原來解壓縮目錄,重新編譯安裝
./configure: error: the HTTP gzip module requires the zlib library.
則需要安裝“zlib-devel”即可。SSH執行以下命令:
yum install -y zlib-devel
./configure: error: the HTTP rewrite module requires the PCRE library.
yum -y install pcre-devel
./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library.
yum -y install openssl openssl-devel
判斷Nginx配置是否正確
nginx -t -c /usr/nginx/conf/nginx.conf
或者
/usr/nginx/sbin/nginx -t