春风十里不如你 —— Taozi - OpenEuler
https://xiongan.host/index.php/tag/OpenEuler/
-
【欧拉】OpenEuler搭建Nginx
https://xiongan.host/index.php/archives/220/
2023-09-08T15:33:00+08:00
OpenEuler的web服务器基础环境查看系统环境版本[root@taozi ~]# cat /etc/os-release
NAME="openEuler"
VERSION="21.09"
ID="openEuler"
VERSION_ID="21.09"
PRETTY_NAME="openEuler 21.09"
ANSI_COLOR="0;31"配置环境首先配置本地yum源,搭建repo服务器清理缓存,重新创建缓存[root@taozi ~]# dnf clean all
[root@taozi ~]# dnf makecache
#安装nginx服务
[root@taozi ~]# dnf install nginx -y查看安装后的rpm包启动nginxi服务并设置开机自启[root@taozi ~]# systemctl start nginx
[root@taozi ~]# systemctl enable nginx查看服务状态Nginx服务的配置文件/etc/nginx/nginx.conf 主要的配置文件/etc/nginx/conf.d 配置文件的辅助目录,也包含在主配置文件当中/usr/share/nginx/html web网站的index文件所在目录查看语法错误【syntax is ok】配置防火墙# firewall-cmd --add-service=http --permanent
success
# firewall-cmd --reload
success验证成功