1.Nginx是由c编写,所以首先需要安装Nginx的运行环境
yum install -y pcre-devel openssl-devel gcc curl
2.下载到/usr/local文件夹下
wget https://openresty.org/download/openresty-1.17.8.2.tar.gz
3.解压
tar -zxvf openresty-1.17.8.2.tar.gz
4.进入解压文件夹执行安装命令
./configure --with-luajit \
--without-http_redis2_module \
--with-http_iconv_module
5.结束后
make && make install
启动即可
./nginx/sbin/nginx