我的虚拟机中在安装GoAccess的时候,说找不到GeoIP...尴尬。

这里暂时不说GeoIP的事情,我想更新一下我的yum源,因为我系统(Centos 6.5)使用的是默认的源。速度比较慢,这里先换一下源,我采用的是阿里的源。

第一步:备份你的原镜像文件,以免出错后可以恢复。

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS
    wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Centos
  wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

第三步:运行yum makecache生成缓存

yum clean all    #清除缓存目录下的软件包及旧的headers
yum makecache    #将服务器上的软件包信息在本地缓存,以提高搜索安装软件的速度
yum -y update #全部更新(可选)( -y 自动选择y,全自动)

更换centos源的更多相关文章

  1. Linux基础学习-RHEL7.4之YUM更换CentOS源

    1.配置YUM本地源 1.挂载镜像 [root@qdlinux ~]# mount /dev/cdrom /mnt 2.查看是否挂载成功 [root@qdlinux ~]# df -h Filesys ...

  2. Redhat更换Centos源

    redhat默认自带的yum源需要注册,才能更新,报错: This system is not registered to Red Hat Subscription Management. You c ...

  3. Centos更换yum源

    Centos更换yum源 步骤如下: 备份原始源 cd /etc/yum.repos.d/ mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/ ...

  4. centos 更换yum源 (解决下载慢的问题)

    先看有没有安装wget         wget -V 如果没有执行   yum -y install wget    进行安装 然后进行配置的备份 mv /etc/yum.repos.d/CentO ...

  5. linux centos&Ubuntu&RedHat更换软件源

    linux三大版本更换软件源 前排提示,有的源可能已经失效,如果发现请留言或自行寻找其他源. 1.centos mv /etc/yum.repos.d/CentOS-Base.repo [--path ...

  6. Centos更换yum源,安装ssh server

    先连上网,然后更换yum源 1. 新建的用户没有sudo权限,所以首先切换到root用户su -输入密码 2. 备份之前的yum源mv /etc/yum.repos.d/CentOS-Base.rep ...

  7. Linux学习(十九)软件安装与卸载(二)更换yum源

    一.简介 系统自带的源数量有限,而且是国外的源,速度肯定不如国内的.而断网的时候,本地源就可以派得上用处.而RPMForge源是传说中规模最大的一个源.那么接下来我们就来分别配一下本地源,国内源,RP ...

  8. Redhat更换yum源

    redhat 默认自带的 yum 源需要注册,才能更新,所以对于我们来说需要替换掉redhat的yum源.下文更换为网易的. 删除原有的yum rpm -qa|grep yum|xargs rpm - ...

  9. CenOS 更换yum源

    说明: 更换CentOS yum源既是修改配置文件/etc/yum.repos.d/CentOS-Base.repo. 目前有很多公司都提供yum源文件的下载,所以我们可以不需要去修改这个文件,直接从 ...

随机推荐

  1. [GDKOI2016]小学生数学题

    记 $F(n)=\sum\limits_{i=1}^{n}i^{-1}$ $G(n)=\sum\limits_{i=1,i\neq jp}^{n}i^{-1}$ 我们要算$F(n)\%p^k$ 那么 ...

  2. 【动态规划】XMU 1560 新ACM规则

    题目链接: http://acm.xmu.edu.cn/JudgeOnline/problem.php?id=1560 题目大意: 给定n(n<=200)个任务及每个任务的耗时,问m(m< ...

  3. 32位vs2010的项目如何在64位系统上运行

    64位注册 1. 关闭Visual Studio.2. 在Visual Studio Tools目录,以管理员身份运行Visual Studio Command Prompt (2010),[注:这个 ...

  4. 慕课网《Android智能机器人“小慕”的实现》项目上手操作与代码解读【2】

    前几天有点忙,一直没写第三方API是怎么调用的,今天我先介绍一下如何调用图灵机器人第三方API. 一.图灵机器人API的调用 首先登录图灵机器人官网首页http://www.tuling123.com ...

  5. HDOJ(HDU) 1977 Consecutive sum II(推导、、)

    Problem Description Consecutive sum come again. Are you ready? Go ~~ 1 = 0 + 1 2+3+4 = 1 + 8 5+6+7+8 ...

  6. linux enable命令学习

    shell命令用来启动或关闭shell内建命令. 通过type命令查看可以知道,enable命令本身也是一个shell内建命令. sh-# type enable enable is a shell ...

  7. wxPython学习笔记(一)

    创建最小的空的wxPython程序 frame = wx.Frame(parent=None, title='Bare') frame.Show() return True app = App() a ...

  8. HDU3631:Shortest Path(Floyd)

    Problem Description When YY was a boy and LMY was a girl, they trained for NOI (National Olympiad in ...

  9. java 泛型处理

    泛型是什么意思在这就不多说了,而Java中泛型类的定义也比较简单,例如:public class Test<T>{}.这样就定义了一个泛型类Test,在实例化该类时,必须指明泛型T的具体类 ...

  10. SQL基础--&gt; 约束(CONSTRAINT)

    --============================= --SQL基础--> 约束(CONSTRAINT) --============================= 一.几类数据完 ...