一、查看centos的版本cat/etc/redhat-release二、添加资源库在centos系统上安装nginx,得先去添加一个资源库:vim/etc/yum.repos.d/nginx.repo[nginx]name=nginxrepobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1三、安装nginxyum-yinstallnginx四、测试nginx配置文件是否正确ngi
2023-05-12评论:0访问次数:1121
centos8中怎样使用yum安装nginxcentos8安装nginxyum直接安装centos8和centos7安装nginx有点点不一样,centos8自带了nginx1.14.1,我们先升级到新稳定版1.20.1在etc目录下创建repo源文件cd/etc/yum.repos.dtouchnginx.repo使用vim编辑vimnginx.repo2.复制以下内容,并使用:wq保存[nginx-stable]name=nginxstablerepobaseurl=http://nginx
2023-05-29评论:0访问次数:891