About Nginx关于Nginx

Nginx is a high performance web server software. It is a much more flexible and lightweight program than Apache HTTP Server.

This tutorial will teach you how to install and start Nginx on your CentOS 7 server.

Nginx 是一个很强大的高性能Web和反向代理服务器,比Apache更轻更灵活。下面我们将教大家如何在Centos7下安装Nginx服务。

CentOS6 YUM源 安装 Nginx

Centos7 yum 安装Nginx:

1.添加Nginx Repository

yum install epel-release

2.安装Nginx

yum install nginx

3.启动Nginx服务:

systemctl start nginx

如果开着防火墙,请运行如下命令:

firewall-cmd --permanent --zone=public --add-service=http  firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload

4.访问IP地址:

http://IP/
nginx_default

如果能看到此页面则说明nginx运作正常!

5.开机自动启动Nginx

systemctl enable nginx

腾讯云限时秒杀【点击购买】

搬瓦工,CN2高速线路,1GB带宽,电信联通优化KVM,延迟低,速度快,建站稳定,搬瓦工BandwagonHost VPS优惠码BWH26FXH3HIQ,支持<支付宝> 【点击购买】!

Vultr$3.5日本节点,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快【点击购买】!

阿里云香港、新加坡VPS/1核/1G/25G SSD/1T流量/30M带宽/年付¥288【点击购买】