安装 wget服务 yum install wget –y
换yum源,换成阿里yum源,处理及下载速度相对快(国内的么)
base基本源
备份:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载最新的CentOS-Base.repo到/etc/yum.repos.d
Centos6:wget -O /etc/yum.repos.d/CentOS-Base.repo
Centos7:wget -O /etc/yum.repos.d/CentOS-Base.repo
安装epel源工具 yum install -y epel-release
备份(如有配置其他epel源)
mv /etc/yum.repos.d/epel.repo /etc/yum.repos.d/epel.repo.backup
mv /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel-testing.repo.backup
下载新repo 到/etc/yum.repos.d/
epel(RHEL 7):wget -O /etc/yum.repos.d/epel.repo
epel(RHEL 6):wget -O /etc/yum.repos.d/epel.repo
运行yum clean all清空所有本地缓存
运行yum makecache生成缓存
安装GCC编译器 用于linux下 源码的编译
yum -y install gcc gcc_c++