##安装
[root@192 yym]# yum install centos-release-scl
[root@192 yym]# yum install devtoolset-7
[root@192 yym]# scl enable devtoolset-7 bash ##source /opt/rh/devtoolset-7/enable
##移动旧gccg++版本目录
[root@192 yym]# mv /usr/bin/gcc /usr/bin/gcc-4.8.5
##软连接到新的gccg++
[root@192 yym]# ln -s /opt/rh/devtoolset-7/root/bin/gcc /usr/bin/gcc
[root@192 yym]# mv /usr/bin/g++ /usr/bin/g++-4.8.5
[root@192 yym]# ln -s /opt/rh/devtoolset-7/root/bin/g++ /usr/bin/g++