Centos6/7更新Yum源-网易yum源/阿里yum源

Contos更新Yum源

下载其他更快的yum源

中科大的yum源:

wget http://centos.ustc.edu.cn/CentOS-Base.repo

163的yum源:

wget http://mirrors.163.com/.help/CentOS-Base-163.repo

sohu的yum源

wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

阿里的yum源

CentOS 6

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

CentOS 7

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

 

一、示例更换阿里云yum源

阿里云 CentOS

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 6

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

CentOS 7

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

3、之后运行yum makecache生成缓存

yum makecache

 


二、示例配置网易163的yum源

1. 下载repo文件

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

2. 备份并替换系统的repo文件

[root@localhost ~]# cd /etc/yum.repos.d/

[root@localhost ~]# mv CentOS-Base.repo CentOS-Base.repo.bak

[root@localhost ~]# mv /root/CentOS6-Base-163.repo CentOS-Base.repo

3. 执行yum源更新

[root@localhost ~]# yum clean all

[root@localhost ~]# yum makecache

[root@localhost ~]# yum update

4. 到此已结束,用yum安装一下文件,看是否OK

[root@localhost ~]# yum install vim*

5. 安装centos常用的软件包及工具

    常见压缩工具 zip unzip bzip2

[root@localhost ~]# yum -y install unzip zip bzip2 bzip2-devel 

  gcc gcc++编译器

[root@localhost ~]# yum install gcc gcc-c++ -y

  cmake编译器

[root@localhost ~]# yum install cmake make -y

  图片资源

[root@localhost ~]# yum -y install gd libjpeg libjpeg-devel libpng libpng-devel freetype-devel 

  其它常用资源包工具

[root@localhost ~]# yum -y install autoconf bison automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*

 

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值