1. 下载repo文件
下载地址:http://mirrors.163.com/.help/CentOS6-Base-163.repo
2. 备份并替换系统的repo文件
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] ~]# mv CentOS-Base.repo CentOS-Base.repo.bak
[[email protected] ~]# mv /root/CentOS6-Base-163.repo CentOS-Base.repo
3. 执行yum源更新
[[email protected] ~]# yum clean all
[[email protected] ~]# yum makecache
[[email protected] ~]# yum update
4. 到此已结束,用yum安装一下文件,看是否OK
[[email protected] ~]# yum install vim*
5. 安装centos常用的软件包及工具
常见压缩工具 zip unzip bzip2
[[email protected] ~]# yum -y install unzip zip bzip2 bzip2-devel
gcc gcc++编译器
[[email protected] ~]# yum install gcc gcc-c++ -y
cmake编译器
[[email protected] ~]# yum install cmake make -y
图片资源
[[email protected] ~]# yum -y install gd libjpeg libjpeg-devel libpng libpng-devel freetype-devel
其它常用资源包工具
[[email protected] ~]# yum -y install autoconf bison automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel*