欢迎各位兄弟 发布技术文章
这里的技术是共享的
在CentOS的最小化安装中,默认是不会安装lspci工具的,需要自己手动安装。
安装步骤:1、yum whatprovides */lspci /* 查找lspci是通过哪个安装包来提供的
2、yum install pciutils
完成安装!
来自 http://blog.51cto.com/nowsun/1053836
[root@localhost yum.repos.d]# yum provides lspci
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Warning: 3.0.x versions of yum would erroneously match against filenames.
You can use "*/lspci" and/or "*bin/lspci" to get that behaviour
No Matches found
[root@localhost yum.repos.d]#
由于一向最小安装,有时不记得某些命令是在哪个安装包中,现写出来方便查找:命令:yum whatprovides */命令名
比如查找pvcreate是哪个安装包提供的:
yum whatprovides */pvcreate
结果显示:[root@iTarget ~]# yum provides */pvcreate
Loaded plugins: product-id, subscription-manager Updating certificate-based repositories. Unable to read consumer identity Repository rhel-source is listed more than once in the configuration lvm2-2.02.95-10.el6.i686 : Userland logical volume management tools Repo : rhel-source Matched from:
来自 https://zhidao.baidu.com/question/710639166834899165.html
使用命令:
nslookup
-bash: nslookup: command not found
安装服务
yum install nslookup
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: mirror.nhanhoa.com
* extras: mirror.nhanhoa.com
* updates: mirror.nhanhoa.com
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 967 kB 00:00
Setting up Install Process
No package nslookup available.
Error: Nothing to do
我们可以加上参数provides来查询nslookup在那个套件中
yum provides nslookup
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: centos-hn.viettelidc.com.vn
* extras: mirror.nhanhoa.com
* updates: centos-hn.viettelidc.com.vn
Warning: 3.0.x versions of yum would erroneously match against filenames.
You can use "*/nslookup" and/or "*bin/nslookup" to get that behaviour
No Matches found
虽然没有查询到,但是还是查存在在bin下面。所以依旧利用参数provides来查询
yum provides *bin/nslookup
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* base: centos-hn.viettelidc.com.vn
* extras: mirror.nhanhoa.com
* updates: centos-hn.viettelidc.com.vn
base/filelists_db | 6.1 MB 00:00
extras/filelists_db | 31 kB 00:00
updates/filelists_db | 855 kB 00:00
32:bind-utils-9.8.2-0.30.rc1.el6.x86_64 : Utilities for querying DNS name servers
Repo : base
Matched from:
Filename : /usr/bin/nslookup
此时发现nslookup属于bind-utils,继续使用yum安装即可
yum install bind-utils
即可完成安装。
注:命令dig与host也是在该套件中。
来自 https://wenku.baidu.com/view/2489825a10661ed9ac51f311.html