Centos 在线yum配置

1如何使用代理上网,设置代理IP

export http_proxy=''

2备份源文件

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

3 下载新的CentOS-Base.repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo

4 运行yum makecache生成缓存

yum clean all
yum makecache

若出现这个错误

Retrieving key from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 

运行该命令:

rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native