备份
# 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. c++ 列表删除元素(erase)

    #include <list> #include <iostream> #include <iterator> using namespace std; int m ...

  2. 桌面以及任务栏的所有浏览器,被加上了 hao.360.cn的网址

    桌面以及任务栏的所有浏览器,被加上了hao.360.cn的网址 也不知道是安装了什么软件,中了360的招. 桌面以及任务栏的所有浏览器,被加上了hao.360.cn的网址. 这种东西,肯定是该死的36 ...

  3. vSphere Client的拷贝 粘帖 功能

    Windows Client OS的情况下, Remote Desktop 自带拷贝/粘帖 功能, 所以一直没在意. 这回用CentOS, 比起vnc viewer , 感觉还是自带的 vSphere ...

  4. python运行错误------Non-UTF-8 code

    1.安装-----见:https://www.cnblogs.com/weven/p/7252917.html 本文转载于:http://blog.csdn.net/youyuyixiu/articl ...

  5. C++的const类成员函数

    转自:http://blog.csdn.net/lihao21/article/details/8634876 我们知道,在C++中,若一个变量声明为const类型,则试图修改该变量的值的操作都被视编 ...

  6. js 数据函数

    //shift:删除原数组第一项,并返回删除元素的值:如果数组为空则返回undefined var a = [1,2,3,4,5]; var b = a.shift(); //a:[2,3,4,5]  ...

  7. bzoj2843&&1180

    题解: lct 和上一题差不多 这一题还要判断是否有链接 其实直接并查集判断就可以了 代码: #pragma GCC optimize(2) #include<bits/stdc++.h> ...

  8. 利用python完成多个url状态码的检测

    import re import requests import json from threading import Thread,Lock from concurrent.futures impo ...

  9. 认识 ARM、FPGA

    0. ARM ARM:Advanced RISC machine,微处理行业的一家知名企业.适用于多种领域,如嵌入控制,消费.教育类多媒体.DSP和移动式应用. 优势: 功耗低,不容易发热.死机: 3 ...

  10. iOS-----简易地CocoaAsyncSocket使用

    CocoaAsyncSocket使用 代理的.h文件 //GCDAsyncSocketDelegate执行代理对象 #import <Foundation/Foundation.h> #i ...