1
安装nginx步骤

1、 lsb_release -a 查看系统版本
微信截图_20200512123645.png

2、安装nginx依赖库

yum install openssl
yum install zlib
yum install pcre

3、安装nginx库
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

4、执行安装nginx
yum install nginx

5、启动服务
systemctl start nginx

6、查看服务状态
systemctl status nginx
16.png
显示这样则表示启动成功

然后访问公网ip即可(ECS安全组的80端口默认打开,所以不用另外配置)


FisherKai
14 声望1 粉丝