zoukankan      html  css  js  c++  java
  • CentOS7 配置阿里云yum源

    首先把selinux给禁用掉,不禁用有时候会各种各样的错误

    查看

    [root@localhost ~]# getenforce
    Enforcing

    永久关闭

    [root@localhost ~]# vi /etc/selinux/config

    修改

    SELINUX=disabled 

    设置后需要重启才能生效

    [root@localhost ~]# reboot

    先执行

    [root@localhost ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    [root@localhost ~]# yum -y install yum-utils
    [root@localhost ~]# yum install wget

    备份

    [root@localhost~]# yum install wget
    [root@localhost~]# cd /etc/yum.repos.d/
    [root@localhost yum.repos.d]# mkdir repo_bak
    [root@localhost yum.repos.d]# mv *.repo repo_bak/
    [root@localhost yum.repos.d]# ls
    repo_bak

    下载新的CentOS-Base.repo 到/etc/yum.repos.d/

    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
    [root@localhost ~]# cd /etc/yum.repos.d/
    [root@localhost yum.repos.d]# ls
    CentOS
    -Base.repo repo_bak

    之后运行yum clean all 清除缓存,运行 yum makecache 生成新的缓存

    [root@localhost yum.repos.d]# yum clean all
    [root@localhost yum.repos.d]# yum makecache
  • 相关阅读:
    IO模型
    协程
    线程
    进程总结
    HashMap和Hashtable有什么区别
    HashMap 1.7 与 1.8 的 区别,说明 1.8 做了哪些优化,如何优化的
    GC线程是否为守护线程?
    float f=3.4;是否正确?
    final、finally和finalized的区别?
    Eureka注册中心是什么?
  • 原文地址:https://www.cnblogs.com/reasonzzy/p/11143737.html
Copyright © 2011-2022 走看看