Cum aflat ce pachet ne trebuie pentru a rula o comanda in CentOS

Configurare noua (How To)

Situatie

Am incercat sa rulam programul “nslookup” pe un sistem CentOS insa acesta nu este instalat.

Backup

Nu este cazul.

Solutie

Pasi de urmat

Rulam comanda:
[root@centos-lvm ~]# nslookup
-bash: nslookup: command not found
[root@centos-lvm ~]#

Vedem ca programul nu este instalat sau nu este in path-ul nostru de programe

Ne vom asigura ca acesta chiar nu este instalat.

[root@centos-lvm ~]# nslookup
-bash: nslookup: command not found
[root@centos-lvm ~]# locate nslooup
[root@centos-lvm ~]#

Daca nu afiseaza nimic inseamna ca nslookup nu este instalat.

Ok, dar cum aflam din ce pachet software face parte comanda nslookup.
Vom folosi yum pentru a lista toate pachetele care ne ofera nslookup.

[root@centos-lvm ~]# yum provides */nslookup
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.pidginhost.com
* epel: ftp.ines.lug.ro
* extras: mirrors.pidginhost.com
* updates: mirrors.pidginhost.com
1:bash-completion-extras-2.1-11.el7.noarch : Additional programmable completions for Bash
Repo : epel
Matched from:
Filename : /usr/share/bash-completion/completions/nslookup

32:bind-utils-9.9.4-37.el7.x86_64 : Utilities for querying DNS name servers
Repo : base
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.9.4-38.el7_3.x86_64 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.9.4-38.el7_3.1.x86_64 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup

32:bind-utils-9.9.4-38.el7_3.2.x86_64 : Utilities for querying DNS name servers
Repo : updates
Matched from:
Filename : /usr/bin/nslookup

zsh-5.0.2-25.el7.x86_64 : Powerful interactive shell
Repo : base
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/nslookup

zsh-5.0.2-25.el7_3.1.x86_64 : Powerful interactive shell
Repo : updates
Matched from:
Filename : /usr/share/zsh/5.0.2/functions/nslookup

[root@centos-lvm ~]#

Dupa cum putea observa sunt mai multe pachete care ofera nslookup.
Dar cum il alegem?
Pai comenzile Linux se ruleaza de obicei (daca sunt instalate dintr-un store) din calea /usr/bin/.
Putem vedea ca pachetul bind-utils va instala nslookup in calea care ne intereseaza.

Apoi instalam cu:
[root@centos-lvm ~]# yum install bind-utils

Gata

 

Tip solutie

Permanent

Voteaza

(0 out of 0 people found this article helpful)

Despre Autor

Leave A Comment?