当前位置: 首页> 健康> 养生 > 校园o2o平台有哪些_h5页面制作工具哪个好_官方百度app下载安装_衡阳seo快速排名

校园o2o平台有哪些_h5页面制作工具哪个好_官方百度app下载安装_衡阳seo快速排名

时间:2025/7/9 16:44:33来源:https://blog.csdn.net/J080624/article/details/146353408 浏览次数:1次
校园o2o平台有哪些_h5页面制作工具哪个好_官方百度app下载安装_衡阳seo快速排名

服务器镜像如下:/etc/yum.repos.d

[root@ecs-q97onp yum.repos.d]# ll
total 44
-rw-r--r-- 1 root root 2523 Mar 18 21:42 CentOS-Base.repo
-rw-r--r-- 1 root root 1309 Mar  2  2021 CentOS-CR.repo
-rw-r--r-- 1 root root  649 Mar  2  2021 CentOS-Debuginfo.repo
-rw-r--r-- 1 root root  326 Mar  2  2021 CentOS-fasttrack.repo
-rw-r--r-- 1 root root  630 Mar  2  2021 CentOS-Media.repo
-rw-r--r-- 1 root root 1331 Mar  2  2021 CentOS-Sources.repo
-rw-r--r-- 1 root root 7577 Mar  2  2021 CentOS-Vault.repo
-rw-r--r-- 1 root root  640 Mar  2  2021 CentOS-x86_64-kernel.repo
-rw-r--r-- 1 root root  664 Mar 18 21:25 epel.repo

这里默认是清华源,但是在使用yum安装的时候提示找不到镜像,故而更换阿里源。

更换基础源配置文件

# CentOS 基础源---这句话很重要哦
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

修改后的阿里云EPEL源配置

sudo tee /etc/yum.repos.d/epel.repo <<'EOF'
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch - Aliyun
baseurl=https://mirrors.aliyun.com/epel/7/$basearch
#baseurl=https://mirrors.aliyun.com/epel/7/$basearch
metalink=
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug - Aliyun
baseurl=https://mirrors.aliyun.com/epel/7/$basearch/debug
#baseurl=https://mirrors.aliyun.com/epel/7/$basearch/debug
metalink=
failovermethod=priority
enabled=0
gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7
gpgcheck=1[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source - Aliyun
baseurl=https://mirrors.aliyun.com/epel/7/SRPMS
#baseurl=https://mirrors.aliyun.com/epel/7/SRPMS
metalink=
failovermethod=priority
enabled=0
gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7
gpgcheck=1
EOF

修改说明:

  1. 镜像地址变更

    • 将原地址 mirrors.tuna.tsinghua.edu.cn 改为 mirrors.aliyun.com
    • 去除了 metalink 参数(阿里云镜像不需要该参数)
  2. GPG密钥地址

    - gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
    + gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7
    
  3. 仓库命名标识

    - name=Extra Packages for Enterprise Linux 7 - $basearch
    + name=Extra Packages for Enterprise Linux 7 - $basearch - Aliyun
    

操作步骤:

  1. 备份原有配置

    sudo cp /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.bak
    
  2. 应用新配置

    sudo curl -o /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
    
  3. 清理并重建缓存

    sudo yum clean all
    sudo yum makecache
    
  4. 验证配置

    yum repolist epel
    

    应该看到类似输出:

    repo id            repo name
    epel/7/x86_64      Extra Packages for Enterprise Linux 7 - x86_64 - Aliyun
    

注意事项:

  1. 如果遇到 GPG key retrieval failed 错误,可临时禁用 GPG 检查:

    sudo yum install --nogpgcheck [package-name]
    
  2. 建议保留原始清华源配置备份,以便需要时恢复:

    sudo mv /etc/yum.repos.d/epel.repo.bak /path/to/backup/
    
  3. 阿里云镜像地址支持 HTTPS 协议访问,如果系统未安装 SSL 证书,可以改用 HTTP:

    baseurl=http://mirrors.aliyun.com/epel/7/$basearch
    
  4. 其他相关镜像源推荐配置:

# CentOS 基础源---这句话很重要哦
sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo# Docker CE 源
sudo curl -o /etc/yum.repos.d/docker-ce.repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

配置前后对比图:

- baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
+ baseurl=https://mirrors.aliyun.com/epel/7/$basearch- gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
+ gpgkey=https://mirrors.aliyun.com/epel/RPM-GPG-KEY-EPEL-7

yum安装的时候指定使用某个镜像

sudo yum install --disablerepo=* --enablerepo=epel[epel为仓库ID] 软件包名
关键字:校园o2o平台有哪些_h5页面制作工具哪个好_官方百度app下载安装_衡阳seo快速排名

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: