下載地址
nginx: download
linux下安裝nginx
第一步:解壓壓縮包(我這邊解壓縮后的文件夾為 nginx-1.22.0)
如果未安裝gcc 和gcc-c++ 、PCRE
yum -y install gcc
yum -y install gcc-c++
yum -y install pcre-devel openssl openssl-devel
安裝成功后
cd nginx-1.22.0
./configure #自動配置
make #執(zhí)行make命令
make install #執(zhí)行make install
whereis nginx #查看安裝目錄/usr/local/nginx
cd /usr/local/nginx/sbin
./nginx
Nginx常用命令
./nginx #啟動
./nginx -s stop #停止
./nginx -s quit #安全退出
./nginx -s reload #重新加載配置文件
ps -ef|grep nginx #查看Nginx進程
參考地址:(29條消息) CentOS7安裝Nginx及./configure: error: the HTTP rewrite module requires the PCRE library.錯誤解決_馮同學(xué)的博客-CSDN博客