CentOS 7 - 安装Nginx

Nginx是一个高性能的Web服务软件。相比Apache HTTP Server更加的轻量级和灵活,是在WEB及服务端开发中必不可少的工具。

本文我们将介绍CentOS 7下Nginx的安装。

  1. 添加仓库
sudo yum install epel-release
  1. 安装Nginx
sudo yum install nginx
  1. 启动Nginx
sudo systemctl start nginx
  1. 如果系统使用了防火墙(firewall),执行下面命令允许http/https
sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

猜你喜欢

转载自blog.51cto.com/11761032/2174940