wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo #base源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo #epel源
因为你本地的镜像可能没有这个包,需要使用阿里的源去下载nginx
2.下载nginx的时候会自动把依赖安装好
yum install -y nginx
systemctl start nginx
/etc/nginx/nginx.conf #配置文件路径
/usr/share/nginx/html/usr #html路径
Nginx安装
最新推荐文章于 2024-05-17 16:41:20 发布