rpm -ivh install the needed packages for yum

#remove the preinstalled rpm packages
[root@localhost Course_material]# rpm -qa|grep yum|xargs rpm -e --nodeps
#again list the installed rpm packages [root@localhost Course_material]# rpm -qa|grep #yum
#download yum-metadata-parser-1,1,2-16.e16
[root@localhost Course_material]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
--2018-11-14 22:07:07--  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27224 (27K) [application/x-redhat-package-manager]
Saving to: ‘yum-metadata-parser-1.1.2-16.el6.x86_64.rpm’

100%[====================================================================================================================>] 27,224      --.-K/s   in 0.04s   

2018-11-14 22:07:07 (694 KB/s) - ‘yum-metadata-parser-1.1.2-16.el6.x86_64.rpm’ saved [27224/27224]

# download yum-3.2.29-81.el6 [root@localhost Course_material]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm 
--2018-11-14 22:07:30--  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1042364 (1018K) [application/x-redhat-package-manager]
Saving to: ‘yum-3.2.29-81.el6.centos.noarch.rpm’

100%[====================================================================================================================>] 1,042,364   2.05MB/s   in 0.5s   

2018-11-14 22:07:30 (2.05 MB/s) - ‘yum-3.2.29-81.el6.centos.noarch.rpm’ saved [1042364/1042364]

#download yum-plugin-fastestmirror, but failed, the newer version of the package can #be found,luckily 
[root@localhost Course_material]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
--2018-11-14 22:07:41--  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-11-14 22:07:41 ERROR 404: Not Found.

[root@localhost Course_material]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
--2018-11-14 22:08:25--  http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 87660 (86K) [application/x-redhat-package-manager]
Saving to: ‘python-urlgrabber-3.9.1-11.el6.noarch.rpm’

100%[====================================================================================================================>] 87,660      --.-K/s   in 0.1s    

2018-11-14 22:08:25 (816 KB/s) - ‘python-urlgrabber-3.9.1-11.el6.noarch.rpm’ saved [87660/87660]

[root@localhost Course_material]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
--2018-11-14 22:08:39--  http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37052 (36K) [application/x-redhat-package-manager]
Saving to: ‘python-iniparse-0.3.1-2.1.el6.noarch.rpm’

100%[====================================================================================================================>] 37,052      --.-K/s   in 0.03s   

2018-11-14 22:08:39 (1.23 MB/s) - ‘python-iniparse-0.3.1-2.1.el6.noarch.rpm’ saved [37052/37052]

[root@localhost Course_material]# wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
--2018-11-14 22:10:19--  http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm
Resolving mirrors.163.com (mirrors.163.com)... 59.111.0.251
Connecting to mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33692 (33K) [application/x-redhat-package-manager]
Saving to: ‘yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm’

100%[====================================================================================================================>] 33,692      --.-K/s   in 0.05s   

2018-11-14 22:10:19 (606 KB/s) - ‘yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm’ saved [33692/33692]

[root@localhost Course_material]#  rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
warning: python-iniparse-0.3.1-2.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
	python(abi) = 2.6 is needed by python-iniparse-0.3.1-2.1.el6.noarch
#linux etc/issue Linux系统开机启动时在命令行界面弹出的欢迎语句文件
[root@localhost Course_material]# cat /etc/issue
\S
Kernel \r on an \m


#查找python 源代码/二进制文件/man手册
[root@localhost Course_material]# whereis python
python: /usr/bin/python /usr/bin/python2.7 /usr/lib/python2.7 /usr/lib64/python2.7 /usr/include/python2.7 /usr/share/man/man1/python.1.gz

 

你可能感兴趣的:(rpm -ivh install the needed packages for yum)