.tar
解包:tar xvf FileName.tar
打包:tar cvf FileName.tar DirName
(注:tar是打包,不是压缩!)
.gz
解压1:gunzip FileName.gz
解压2:gzip -d FileName.gz
压缩:gzip FileName
.tar.gz 和 .tgz
解压:tar zxvf FileName.tar.gz
压缩:tar zcvf FileName.tar.gz DirName
It works!
1、插入第一张安装盘,首先在/mnt下创建cdrom文件夹,然后挂载安装盘:mount /dev/cdrom /mnt/cdrom;
2、进入/mnt/cdrom/Server,按顺序安装以下包:
(1)[root@localhost Server]# find -iname kernel-headers*
./kernel-headers-2.6.18-128.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./kernel-headers-2.6.18-128.el5.i386.rpm
warning: ./kernel-headers-2.6.18-128.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:kernel-headers ########################################### [100%]
挂上第二张光盘
(2)[root@localhost Server]# find -iname glibc-headers*
./glibc-headers-2.5-34.i386.rpm
[root@localhost Server]# rpm -ivh ./glibc-headers-2.5-34.i386.rpm
warning: ./glibc-headers-2.5-34.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:glibc-headers ########################################### [100%]
(3)[root@localhost Server]# find -iname glibc-devel*
./glibc-devel-2.5-34.i386.rpm
[root@localhost Server]# rpm -ivh ./glibc-devel-2.5-34.i386.rpm
warning: ./glibc-devel-2.5-34.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:glibc-devel ########################################### [100%]
(4)[root@localhost Server]# find -iname libgomp*
./libgomp-4.3.2-7.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./libgomp-4.3.2-7.el5.i386.rpm
warning: ./libgomp-4.3.2-7.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libgomp ########################################### [100%]
(5)[root@localhost Server]# rpm -ivh gcc-4.1.2-44.el5.i386.rpm
warning: gcc-4.1.2-44.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:gcc ########################################### [100%]
(6)[root@localhost Server]# find -iname libstdc++-devel*
./libstdc++-devel-4.1.2-44.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./libstdc++-devel-4.1.2-44.el5.i386.rpm
warning: ./libstdc++-devel-4.1.2-44.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [100%]
(7)[root@localhost Server]# find -iname gcc-c++*
./gcc-c++-4.1.2-44.el5.i386.rpm
[root@localhost Server]# rpm -ivh ./gcc-c++-4.1.2-44.el5.i386.rpm
warning: ./gcc-c++-4.1.2-44.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:gcc-c++ ########################################### [100%]
3、最后进入/mnt,输入rpm –qa gcc*,如过成功安装了gcc,可以查出以下内容:
gcc-c++-4.1.2-44.el5
gcc-4.1.2-44.el5
可能还会在装这些包之间装上这三个包:
binutils-2.13.90.0.18-9.i386.rpm
cpp-3.2.2-5.i386.rpm