突然想起试试 Docker,在一台计算机上安装了 CentOS 7,准备开工,突然想起还需要做一件事情,更改源,不然安装肯定会很慢,网上搜索了一下,文章很多,但是会出一些问题,所以将自己的成功的日志写下来,分 享一下.搜索的文章步骤都一样,只是运行命令的时候出现无法联网,可能是原来的文章中源已经移除更新.我使用的163源,具体步骤: 直接打开 163 源网站:http://mirrors.163.com/.help/centos.html 按照使用说明,还是先备份一下源(使用下面的命令重命名原来…
以centos7为例 ,以 修改为阿里的yum源 1. 备份本地yum源 [root@localhost yum.repos.d]# cp CentOS-Base.repo CentOS-Base.repo.bak 2.获取阿里yum源配置文件 [root@localhost yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo [base] baseurl 到 repodata [cloud]  name=CentOS-…
CentOS5.x: http://mirrors.163.com/.help/CentOS5-Base-163.repo CentOS6.x: http://mirrors.163.com/.help/CentOS6-Base-163.repo CentOS 163 yum源使用: 1.先关闭 fastestmirror vim /etc/yum/pluginconf.d/fastestmirror.conf 设置 enable=0 2.先备份  /etc/yum.repos.d/CentOS…
将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.repo http://mirrors.aliyun.com/repo/Centos-5.repo CentOS…
一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者163等国内的yum源(下文介绍如何配置). 但是以上的方法都是需要网络的,当没有网络的时候就无法使用了,所以还有一个常用的方法就是用Centos的iso镜像搭建本地yum源,这样安装软件的速度就会飞快,缺点是可能有些包没有. 1.安装Centos后默认的yum源如下 [root@kangvcar…
CentOS7 配置163 yum源 1)下载repo文件  wget http://mirrors.163.com/.help/CentOS7-Base-163.repo   2)备份并替换系统的repo文件  cp CentOS7-Base-163.repo /etc/yum.repos.d/  cd /etc/yum.repos.d/  mv CentOS-Base.repo CentOS-Base.repo.bak  mv CentOS7-Base-163.repo CentOS-Bas…
因为Linux默认的yum源是国外的源,所以会有卡顿,缓慢的情况.而国内的Yum源相对速度较快,现在也比较成熟,所以给Linux更换国内Yum源是一个很好的选择. 1.  备份(备份之前需要yum install wget,因为Linux默认是没有安装wget的) 备份下来,以备不时之需. 2. 下载国内的yum源,放到原先的位置,并改为一样的名字 3.  生成缓存(成功)…
这个脚本也没啥多大意义,只是为了自己练习着写一下bash ===================================================================================== #!/bin/bash # Backup CentOS-Base.repo 备份原来的源 pushd /etc/yum.repos.d/ a=/etc/yum.repos.d/CentOS-Base.repo 将文件的路径值赋给变量,然后判断这个文件是否存在 #判断的语…
我安装的系统是centos6.5的,要在系统上安装DRBD镜像软件,安装完后,无法加载modprobe drbd. 需要更新kernel. 1,首先,先把yum源更换成国内的,不然无法更新kernel a, 先备份/etc/yum.repos.d/CentOS-Base.repo (改名) mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup b, wget -O  /etc/yum.repos…
首先备份CentOS-Base.repo [root@richard yum.repos.d]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 其次,下载对应版本的CentOS-Base.repo, 放入/etc/yum.repos.d/目录 CentOS6.x [root@richard yum.repos.d]# wget http://lug.ustc.edu.cn/wiki/_e…