yum で CentOS に nc(netcat) をさくっとインストールする手順

CentOS に netcat が入っていなかったので yum でインストールしました。

$cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core) 
$

CentOS 7.2 です。

$ yum search netcat
読み込んだプラグイン:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.riken.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
================================================================= N/S matched: netcat =================================================================
nmap-ncat.x86_64 : Nmap's Netcat replacement
socat.x86_64 : Bidirectional data relay between two data channels ('netcat++')

  Name and summary matches only, use "search all" for everything.
$ 
$ yum info nmap-ncat.x86_64
読み込んだプラグイン:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Loading mirror speeds from cached hostfile
 * base: www.ftp.ne.jp
 * epel: ftp.riken.jp
 * extras: www.ftp.ne.jp
 * updates: www.ftp.ne.jp
利用可能なパッケージ
名前                : nmap-ncat
アーキテクチャー    : x86_64
エポック            : 2
バージョン          : 6.40
リリース            : 7.el7
容量                : 201 k
リポジトリー        : base/7/x86_64
要約                : Nmap's Netcat replacement
URL                 : http://nmap.org/
ライセンス          : GPLv2 and LGPLv2+ and GPLv2+ and BSD
説明                : Ncat is a feature packed networking utility which will read and
                    : write data across a network from the command line.  It uses both
                    : TCP and UDP for communication and is designed to be a reliable
                    : back-end tool to instantly provide network connectivity to other
                    : applications and users. Ncat will not only work with IPv4 and IPv6
                    : but provides the user with a virtually limitless number of potential
                    : uses.

$
$ yum install nmap-ncat.x86_64
読み込んだプラグイン:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
このコマンドを実行するには root である必要があります。
$
$ sudo yum install nmap-ncat.x86_64
[sudo] password for oreore: 
読み込んだプラグイン:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base                                                                                                                            | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                                                                            | 5.9 kB  00:00:00     
epel                                                                                                                            | 4.3 kB  00:00:00     
extras                                                                                                                          | 3.4 kB  00:00:00     
updates                                                                                                                         | 3.4 kB  00:00:00     
(1/5): base/7/x86_64/group_gz                                                                                                   | 155 kB  00:00:00     
(2/5): epel/x86_64/updateinfo                                                                                                   | 687 kB  00:00:00     
(3/5): updates/7/x86_64/primary_db                                                                                              | 1.2 MB  00:00:00     
(4/5): base/7/x86_64/primary_db                                                                                                 | 5.6 MB  00:00:01     
(5/5): epel/x86_64/primary_db                                                                                                   | 4.4 MB  00:00:01     
Determining fastest mirrors
 * base: ftp.iij.ad.jp
 * epel: ftp.riken.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
---> パッケージ nmap-ncat.x86_64 2:6.40-7.el7 を インストール
--> 依存性解決を終了しました。

依存性を解決しました

=======================================================================================================================================================
 Package                              アーキテクチャー                  バージョン                               リポジトリー                     容量
=======================================================================================================================================================
インストール中:
 nmap-ncat                            x86_64                            2:6.40-7.el7                             base                            201 k

トランザクションの要約
=======================================================================================================================================================
インストール  1 パッケージ

総ダウンロード容量: 201 k
インストール容量: 414 k
Is this ok [y/d/N]: y
Downloading packages:
nmap-ncat-6.40-7.el7.x86_64.rpm                                                                                                 | 201 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  インストール中          : 2:nmap-ncat-6.40-7.el7.x86_64                                                                                          1/1 
  検証中                  : 2:nmap-ncat-6.40-7.el7.x86_64                                                                                          1/1 

インストール:
  nmap-ncat.x86_64 2:6.40-7.el7                                                                                                                        

完了しました!
$

以上で完了です。

$ which nc
/usr/bin/nc
4

/usr/bin にインストールされました。

$ man nc でマニュアルを読むこともできます。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください