1.vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1
2.安装nginx
[root@wjb10000 ~]# yum -y install nginx
3.启动服务
[root@wjb10000 ~]# systemctl start nginx.service
4.查看是否启动成功
[root@wjb10000 ~]# systemctl status nginx
或者浏览器输入服务器ip地址:
5.查看配置文件位置
ps aux | grep nginx
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1
2.安装nginx
[root@wjb10000 ~]# yum -y install nginx
3.启动服务
[root@wjb10000 ~]# systemctl start nginx.service
4.查看是否启动成功
[root@wjb10000 ~]# systemctl status nginx
或者浏览器输入服务器ip地址:
5.查看配置文件位置
ps aux | grep nginx