nginx安装及入门

一、官方文档

Nginx中文文档

二、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相关命令

在这里插入图片描述

文章仅供学习交流,侵权联系删除。

路虽远,行则将至;事虽难,做则必成。 ——《人民日报》

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值