Today, we need to use dbt2 to test the database. When installing some environment software, Sohu's source performance is very poor, and the old man's resources are not accessible. So I want to change the yum source to 163. Here is the first line of the article (http://xiaotanglinux.blog.51cto.com/694236/639423), copy it.
#! /Bin/sh
#*************************************** *************************#
# Scriptname: yum_update.sh
# Author: baoqing. guobq
# Create Date: 2011-07-21
# Modify Author:
# Modify Date: 2011-07-21
# Function:
#*************************************** ************************#
MV/etc/yum. Repos. d/rhel-debuginfo.repo/etc/yum. Repos. d/rhel-debuginfo.repo.bak
Rpm-e -- nodeps yum-security-1.1.16-13.el5
Rpm-e -- nodeps yum-metadata-parser-1.1.2-2.el5
Rpm-e -- nodeps yum
Rpm-e -- nodeps yum-updatesd-0.9-2.el5
Rpm-e -- nodeps yum-rhn-plugin-0.5.3-30.el5
Rpm-IVH http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm &&
Rpm-IVH http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm -- nodeps &&
Rpm-IVH http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm &&
Rpm-IVH http://mirrors.163.com/centos/5/ OS /x86_64/CentOS/yum-3.2.22-33.el5.centos.noarch.rpm &&
CD/etc/yum. Repos. d/
Wget http://mirrors.163.com/centos/5/ OS /x86_64/RPM-GPG-KEY-CentOS-5
Rpm -- import RPM-GPG-KEY-CentOS-5 &&
Wget http://mirrors.163.com/.help/CentOS-Base-163.repo-O/etc/yum. Repos. d/CentOS-Base.repo &&
Sed-I's/\ $ releasever/5/G'/etc/yum. Repos. d/CentOS-Base.repo
# Yum update