| RHEL 8 搭建 Nginx Web 服务前请把 yum 源配好。 |
环境
Red Hat Enterprise Linux release 8.0
VMware Workstation Pro 14
搭建步骤
[root@localhost ~]# systemctl stop httpd #把 httpd 停掉,防止它影响 Nginx
[root@localhost ~]# yum install -y nginx
[root@localhost ~]# systemctl start nginx
[root@localhost ~]# iptables -F
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.118 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::e09a:769b:83f0:8efa prefixlen 64 scopeid 0x20
ether 00:50:56:34:0d:74 txqueuelen 1000 (Ethernet)
RX packets 2908 bytes 1777392

本文介绍了在RHEL 8系统中使用yum安装Nginx并进行配置的过程,包括查看服务器状态、自定义首页内容、解决403 Forbidden错误、设置文件共享服务以及端口映射,确保Nginx能够正确显示中文内容。
最低0.47元/天 解锁文章
1660

被折叠的 条评论
为什么被折叠?



