惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
N
Netflix TechBlog - Medium
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
GbyAI
GbyAI
B
Blog
F
Fortinet All Blogs
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
A
About on SuperTechFans
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
MyScale Blog
MyScale Blog
B
Blog RSS Feed

博客园 - onekey

MPU9250九轴陀螺仪--读接口数据 MPU9250九轴陀螺仪--连接MPU9250 Elasticsearch -- 索引管理 centos 7下rabbitmq安装(转) CentOS下Redis的安装(转) CentOS7.5 安装MySQL8 tar Ntrip协议简介(转) 路径规划(3)--搭建Ntrip环境:NtripServer,NtripClient and NtripCaster 路径规划(2)--设置基站和移动站 路径规划(1)--连接GPS接收端 环境搭建--使用pytharm远程调试树莓派 elasticsearch -- Logstash实现mysql同步数据到elasticsearch elasticsearch -- 安装 elasticsearch -- kibana安装配置 Elasticsearch -- Head插件安装 在Win10 Anaconda中安装Tensorflow TensorFlow官方文档中文版 myeclipse编译、输出 win7 64位下使用oracle ado.net entity framework
在CentOS 7上安装Nginx
onekey · 2019-01-18 · via 博客园 - onekey

本教程中的步骤要求用户拥有root权限

第一步 - 添加Nginx存储库
要添加CentOS 7 EPEL仓库,请打开终端并使用以下命令:

sudo yum install epel-release
第二步 - 安装Nginx
现在Nginx存储库已经安装在您的服务器上,使用以下yum命令安装Nginx :

sudo yum install nginx
在对提示回答yes后,Nginx将在服务器上完成安装。

第三步 - 启动Nginx
Nginx不会自行启动。要运行Nginx,请输入:

sudo systemctl start nginx
如果您正在运行防火墙,请运行以下命令以允许HTTP和HTTPS通信:

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
您将会看到默认的CentOS 7 Nginx网页,这是为了提供信息和测试目的。它应该看起来像这样:

如果看到这个页面,那么你的Web服务器现在已经正确安装了。

如果想在系统启动时启用Nginx。请输入以下命令:

sudo systemctl enable nginx
恭喜!Nginx现在已经安装并运行了!