1. 程式人生 > >linux系統配置yum源

linux系統配置yum源

linux yum源 centos6

1.進入yum源配置目錄

cd /etc/yum.repos.d


2.配置本地yum源

vi CentOS-Media.repo 

[c6-media]
name=CentOS-$releasever - Media
baseurl=file:///mnt
        file:///media  
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6


3.配置網絡yum源

下載163網易的yum源:
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo


3.配置好yum源後,執行下邊命令更新yum配置,使操作立即生效

yum makecache

4.其他網絡yum源

中科大的yum源:
wget http://centos.ustc.edu.cn/CentOS-Base.repo
 
sohu的yum源
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
 
epel源
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install  epel-release-6-8.noarch.rpm  

或者使用rpm直接安裝
rpm –ivh  http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

配置好之後,在這個目錄下會生成幾個.repo文件
[[email protected]
/* */ yum.repos.d]# ls bak CentOS6-Base-163.repo CentOS-Media.repo epel.repo epel-testing.repo


本文出自 “hello world” 博客,請務必保留此出處http://nxyboy.blog.51cto.com/10511646/1939540

linux系統配置yum源