centos7 comes with gcc version is 4.8, gcc network through the official installation manual shows that too much reliance file, manually upgrade installation too complicated. Gcc version upgrade to high indirectly by way of installing devtoolset
sudo yum install centos-release-scl
sudo yum install devtoolset-7-gcc*
scl enable devtoolset-7 bash which gcc gcc --version