备份
# cp /etc/yum.repos.d/CentOS-Base.repo  /etc/yum.repos.d/CentOS-Base.repo.bak
修改
# vi /etc/yum.repos.d/CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 #contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirrors.163.com/centos/$releasever/contrib/$basearch/
gpgcheck=
enabled=
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# yum clean all
# yum makecache     #将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度
# yum install vim*    #测试域名是否可用

开始更新系统:

# yum update

============================

注:CentOS使用yum update更新时不升级内核
cp /etc/yum.conf /etc/yum.confbak

方法一、修改yum的配置文件

# vi /etc/yum.conf 在[main]的最后添加 exclude=kernel*

方法二、直接在yum的命令后面加上如下的参数:
# yum --exclude=kernel* update

centos使用163 yum源的更多相关文章

  1. CentOS更新163 yum源

    这个脚本也没啥多大意义,只是为了自己练习着写一下bash ======================================================================= ...

  2. centos 7 163 yum 源 python 2.7.5

    安装 repo 源. repo 源一般包括 base, updates, Extras 三部分. $ cd /etc/yum.repos.d/ $ wget http://mirrors.163.co ...

  3. 更改CentOS 6.3 yum源为国内163源

    CentOS5.x: http://mirrors.163.com/.help/CentOS5-Base-163.repo CentOS6.x: http://mirrors.163.com/.hel ...

  4. CentOS下安装yum源的流程和操作

    一般公司都用Linux来搭建服务器,Linux安装软件时能够用yum安装依赖包是一件非常简单而幸福的事情,因为你只需一个简单的安装命令yum install []即可安装相应的软件,yum工具会自动的 ...

  5. RedHat Enterprise Linux 6.4使用Centos 6的yum源问题

    RedHat Enterprise Linux 6.4使用Centos 6的yum源问题 作为一名新手,学习Linux已经一个月了,其间遇到了不少问题,而今天笔者遇到的问题是 #yum install ...

  6. CentOS配置本地yum源/阿里云yum源/163yuan源,并配置yum源的优先级

    一.用Centos镜像搭建本地yum源 由于安装centos后的默认yum源为centos的官方地址,所以在国内使用很慢甚至无法访问,所以一般的做法都是把默认的yum源替换成aliyun的yum源或者 ...

  7. 更改CentOS 6.3 yum源为国内 阿里云源

    将CentOS的 yum源 更换为 阿里云源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.b ...

  8. centOS下更新yum源

    CentOS下更新yum源 1.使用如下命令,备份/etc/yum.repos.d/CentOS-Base.repo. cp /etc/yum.repos.d/CentOS-Base.repo /et ...

  9. RHEL 6.6配置网易CentOS镜像的yum源小结

       之前没有使用过网易CentOS镜像的yum源,最近由于需要,遂在一台测试服务器验证.测试了一下如何配置使用网易的Cent0S的yum源.此文仅仅是笔记性质,参考了网上大量资料(文末"参 ...

随机推荐

  1. xtu 1242 Yada Number 容斥原理

    Yada Number Problem Description: Every positive integer can be expressed by multiplication of prime ...

  2. Java回顾之ORM框架

    这篇文章里,我们主要讨论ORM框架,以及在使用上和JDBC的区别. 概述 ORM框架不是一个新话题,它已经流传了很多年.它的优点在于提供了概念性的.易于理解的数据模型,将数据库中的表和内存中的对象建立 ...

  3. MySQL分页查询大数据量优化方法

    方法1: 直接使用数据库提供的SQL语句 语句样式: MySQL中,可用如下方法: SELECT * FROM 表名称 LIMIT M,N适应场景: 适用于数据量较少的情况(元组百/千级)原因/缺点: ...

  4. 关于keyCode, 键盘代码。 和零散的javascript知识。http://js2.coffee/(转化工具)

    这个是coffeescript代码 document.addEventListener 'turbolinks:load', ->   document.getElementById(" ...

  5. bzoj3172: [Tjoi2013]单词 ac自动机

    某人读论文,一篇论文是由许多单词组成.但他发现一个单词会在论文中出现很多次,现在想知道每个单词分别在论文中出现多少次. Input 第一个一个整数N,表示有多少个单词,接下来N行每行一个单词.每个单词 ...

  6. linux下升级npm以及node

    npm升级 废话不多说,直接讲步骤.先从容易的开始,升级npm. npm这款包管理工具虽然一直被人们诟病,很多人都推荐使用yarn,但其使用人数还是不见减少,况且npm都是随node同时安装好的,一时 ...

  7. SPOJ COMPANYS Two Famous Companies 最小生成树,二分,思路 难度:2

    http://www.spoj.com/problems/COMPANYS/en/ 题目要求恰好有k条0类边的最小生成树 每次给0类边的权值加或减某个值delta,直到最小生成树上恰好有k条边为0,此 ...

  8. 1元抢卡巴KAV_不限量疯抢即日起至2013.10.31截止

    活动地址:http://img.kaba365.com/mail_files/kaba1yuan.html

  9. vue url生产二维码

    <template> <div id="QRcode"> <div class='QR-qrcode' style='display:none;'&g ...

  10. 基于Html5的爱情主题网站–表白神器

    介绍 一个基于基于Html5的爱情主题,文字采用打字机效果,逐字打印,并带有键盘敲击声音.在chrome,safari,firefox,IE10下都有效,chrome下效果最佳.要注意的是safari ...