JAVA和Nginx 教程大全

网站首页 > 精选教程 正文

在 CentOS8 上安装 Nginx web server

wys521 2024-09-08 22:55:07 精选教程 29 ℃ 0 评论

CentOS8 已经发布了,会有越来越多的IT部门来使用它,先装个 Nginx,把业务跑起来再说吧!

Lets go!

1, create repo

vi /etc/yum.repos.d/nginx.repo

添加:

[nginx]

name=nginx repo

baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

gpgcheck=0

enabled=1

2,使用 dnf/yum 安装 nginx

dnf install nginx

3,在防火墙中,开放业务端口,Open HTTP and HTTPS ports on firewall

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

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

firewall-cmd --zone=public --permanent --add-service=ssh

firewall-cmd --reload

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表