1 打开VMWare界面,选择菜单VM–Settings,在对话框中选择CDROM,设置参数为Use ISO image,选择CentOS镜像安装文件;
2 启动虚拟机中的CentOS系统,用root登录,在桌面上用鼠标右键新建一终端窗口;
3 在终端中输入 cd /media/CentOS_5.2_Final/CentOS 回车
[root@localhost CentOS]# rpm -ivh cpp-4.1.2-48.el5.i386.rpm
[root@localhost CentOS]# rpm -ivh kernel-headers-2.6.18-194.el5.i386.rpm
[root@localhost CentOS]# rpm -ivh glibc-headers-2.5-49.i386.rpm
[root@localhost CentOS]# rpm -ivh glibc-devel-2.5-49.i386.rpm
[root@localhost CentOS]# rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
[root@localhost CentOS]# rpm -ivh gcc-4.1.2-48.el5.i386.rpm
[root@localhost CentOS]# gcc -v