Redhat Linux 7 安装 gcc

挂载安装CD:
ls -l /dev | grep cdrom
mount /dev/光盘名 /mnt/

安装RPM包:
cd /mnt
cd RedHat/RPMS
rpm -ivh glibc-kernheaders-xxxx.rpm
rpm -ivh glibc-devel-xxx.rpm
rpm -ivh cpp-xxx.rpm
rpm -ivh binutils-xxx.rpm
rpm -ivh gcc-xxx.rpm

如果出现报错:
error: cannot create %sourcedir /usr/src/redhat/SOURCES
则创建 /usr/src/redhat/SOURCES 目录