云服务器JAVA运行环境搭建(2)-更换服务器中的yum源
在国内,推荐把yum源换成阿里的,具体操作步骤如下
1. 备份原始yum源
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 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo ht