简介:
Nginx 是一个高性能的HTTP和反向代理服务,也是一个IMAP/POP3/SMTP服务。
1、配置网络yum源
[root@localhost ~]# vim /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/
gpgcheck=0
enabled=1
2、设置安装环境
[root@localhost ~]# yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
[root@localhost ~]# yum -y install wget httpd-tools
3、安装Nginx,要确保Linux可以连接外网
[root@localhost ~]# yum -y install nginx
4、关闭SELinux
[root@localhost ~]# setenforce 0
5、启动Nginx服务
[root@localhost ~]# systemctl start nginx
6、在浏览器输入Linux的IP