CentOS6 yum升级高版本gcc
gcc 4.8安装
# curl -Lks http://www.hop5.in/yum/el6/hop5.repo > /etc/yum.repos.d/hop5.repo
# yum install gcc gcc-g++ –y
# gcc --version
gcc 4.9 安装
# yum install centos-release-scl –y
# yum install devtoolset-3-toolchain –y
# scl enable devtoolset-3 bash
# gcc –version
gcc 5.2 安装
# yum install centos-release-scl –y
# yum install devtoolset-4-toolchain –y
# scl enable devtoolset-4 bash
# gcc --version
# g++ --version