yum安装Nginx

一、使用下面两个地址下载对应的nginx.rpm包

CentOS7版本
# http://nginx.org/packages/rhel/7/x86_64/RPMS
CentOS6版本
# http://nginx.org/packages/rhel/6/x86_64/RPMS

 二、将下载的rpm包传到centos上,任意目录都行,要记得在哪里

a. 安装上传的rpm包

# rpm -ivh nginx-1.18.0-1.el7.ngx.x86_64.rpm

 

b. 查看是否安装好了nginx

# yum list installed nginx

 

 三、启动nginx并设置开机自启动

# systemctl start nginx   ---启动nginx
# systemctl enable nginx   ---设置开机自启动
# service nginx status   ---查看nginx服务运行状态

 打开你的浏览器,访问你的服务器域名,能看到以下的信息代表nginx装好了

 

posted @ 2020-07-30 23:45  Brother_BigCousin  阅读(79)  评论(0编辑  收藏  举报