CentOS
GCC

CentOS 6.6 に gcc 4.7 を導入

More than 1 year has passed since last update.
# cd /etc/yum.repos.d
# wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo
# yum -y --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++
# /opt/centos/devtoolset-1.1/root/usr/bin/g++ --version
g++ (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)

# vi /etc/profile
export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/g++
export PATH=/opt/centos/devtoolset-1.1/root/usr/bin:$PATH

$ g++ --version
g++ (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)