openEuler 下安装nginx
1、更新源
执行如下命令, 下载新的openEulerOS.repo到/etc/yum.repos.d/目录下
for aarch64:
wget -O /etc/yum.repos.d/openEulerOS.repo https://repo.huaweicloud.com/repository/conf/openeuler_aarch64.repo
for x86:
wget -O /etc/yum.repos.d/openEulerOS.repo https://repo.huaweicloud.com/repository/conf/openeuler_x86_64.repo
2、执行yum clean all清除原有yum缓存
3、执行yum makecache生成新的缓存
4、安装nginx
使用yum install nginx 安装nginx
yum intall nginx
5、通过whereis nginx查看安装位置
6、nginx常用命令
启动Nginx: systemctl start nginx
停止Nginx: systemctl stop nginx
查看Nginx启动状态: systemctl status ngin