官网地址:http://nginx.org/en/download.html
nginx依赖
gcc gcc-c++ pcre-devel zlib-devel
部署nginx
复制链接
sudo yum -y install gcc gcc-c++ pcre-devel zlib-devel
wget http://nginx.org/download/nginx-1.18.0.tar.gz
tar xvf nginx-1.18.0.tar.gz
cd nginx-1.18.0
./configure --prefix=/opt/nginx
#此文件为nginx配置文件中高亮的作用,复制以后在查看nginx文件的时候会不一样哦
cp -r contrib/vim/ ~/.vim/
./configure --prefix=/opt/nginx
sudo make && sudo make install
nginx查看模块
#此文件为tar包解压之后的目录
cat ~/nginx-1.18.0/auto/options |grep YES
/opt/nginx/sbin/nginx -V
|