一、挂载光盘
#mount /dev/cdrom /mnt
二、进入光盘目录
#cd /mnt/Packages/
二、依次安装下列rpm包
#rpm -ivh glibc-common-2.5-42.i386.rpm
#rpm -ivh kernel-headers-2.6.18-164.el5.i386.rpm
#rpm -ivh libgcc-4.1.2-46.el5.i386.rpm
#rpm -ivh glibc-2.5-42.i686.rpm
#rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
#rpm -ivh nscd-2.5-42.i386.rpm
#rpm -ivh glibc-headers-2.5-42.i386.rpm
#rpm -ivh glibc-devel-2.5-42.i386.rpm
#rpm -ivh mpfr-2.4.1-6.el6.i686.rpm
#rpm -ivh ppl-0.10.2-11.el6.i686.rpm
#rpm -ivh cloog-ppl-0.15.7-1.2.el6.i686.rpm
#rpm -ivh cpp-4.1.2-46.el5.i386.rpm
#rpm -ivh gcc-4.1.2-46.el5.i386.rpm
(注:以上是安装gcc)
#rpm -ivh libstdc++-4.1.2-46.el5.i386.rpm
#rpm -ivh libstdc++-devel-4.1.2-46.el5.i386.rpm
#rpm -ivh gcc-c++-4.1.2-46.el5.i386.rpm
(注:以上是安装gcc-c++)