一、官方文档
二、linux中安装nginx
1、编辑安装脚本
vim openresty.sh
yum install -y pcre-devel openssl-devel gcc curl
cd /usr/local/
wget https://openresty.org/download/openresty-1.17.8.2.tar.gz
cd /usr/local/
tar -zxvf openresty-1.17.8.2.tar.gz
cd /usr/local/
mv openresty-1.17.8.2 openresty
cd /usr/local/openresty/
./configure --with-luajit \
--without-http_redis2_module \
--with-http_iconv_module
cd /usr/local/openresty/
make && make install
2、赋予脚本执行权限
chmod +x openresty.sh
3、执行脚本
sh openresty.sh
4、安装后启动nginx
cd /usr/local/openresty/nginx/sbin
./nginx
5、查看是否成功启动
命令查看 ps -aux | grep nginx
查看虚机ip,浏览器中直接通过ip访问,得到如下界面
三、nginx相关命令
文章仅供学习交流,侵权联系删除。
路虽远,行则将至;事虽难,做则必成。 ——《人民日报》