更改yum源及pip源
CentOS更改yum源为阿里 1、备份 mv/etc/yum.repos.d/CentOS-Base.repo/etc/yum.repos.d/CentOS-Base.repo.backup 2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/ CentOS 5 wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-5.repo wget-O/etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-5.repo 或者 curl-o/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-5.repo CentOS 6 wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-6.repo wget-O/etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-6.repo 或者 curl-o/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-6.repo CentOS 7 wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-7.repo wget-O/etc/yum.repos.d/epel.repohttp://mirrors.aliyun.com/repo/epel-7.repo 或者 curl-o/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-7.repo 3、之后运行yum makecache生成缓存 更改Python pip源 Linux下,修改~/.pip/pip.conf(没有就创建一个), 修改index-url至tuna,内容如下: [global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple windows下,直接在user目录中创建一个pip目录,如:C:Usersxxpip,新建文件pip.ini,内容如下 [global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple 参考网址:http://mirrors.aliyun.com/help/centos?spm=5176.bbsr150321.0.0.d6ykiD http://blog.csdn.net/lambert310/article/details/52412059 知行办公,专业移动办公平台 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |