LoginSignup
0
1

More than 5 years have passed since last update.

さくらのクラウドに「vnstat」をインストールする際に躓いた話

Last updated at Posted at 2017-07-14

さくらのナレッジに書かれているパフォーマンス取得を試してみようと思ったときに、vnstatを使いたいと思ったときにインストールがうまく行かなかったので、やったことの備忘録です。

Linuxパフォーマンスモニタを活用したボトルネックの把握 – 「さくらのクラウド入門」(6)

この中の ネットワークの流量を把握する の項目で使われているコマンドになります。

今回使ったのはCentOS6です。
標準ではvnstatコマンドがインストールされていないので以下の様にコマンドがないよという警告が表示されます。

[root@localhost ~]# vnstat -i eth0 -l
-bash: vnstat: command not found

ではYumでインストールしてみます。

[root@localhost ~]# yum install vnstat
Loaded plugins: fastestmirror, priorities, security
Setting up Install Process
Determining fastest mirrors
base                                                     | 3.7 kB     00:00
extras                                                   | 3.4 kB     00:00
extras/primary_db                                        |  29 kB     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       | 2.5 MB     00:00
No package vnstat available.
Error: Nothing to do

何もしない(Nothing to do)

実はepel.repoがdisabledとなっていることが原因です。
epel.repoを修正してみます。

ちなみにさくらのクラウドではCentOSのリリースノートを公開しているのでちゃんと読まないといけないですね:innocent:
CentOS 6.9 64bit リリースノート

[root@localhost ~]# vi /etc/yum.repos.d/epel.repo

enabled=0 となっているので enabled=1 に変更する。

では実際にインストールを行ってみます!

[root@localhost ~]# yum install vnstat

 ~中略~

Installed:
  vnstat.x86_64 0:1.11-1.el6

Dependency Installed:
  gd.x86_64 0:2.0.35-11.el6           libXpm.x86_64 0:3.5.10-2.el6

Complete!

インストール成功しました!

[root@localhost ~]# vnstat -i eth0 -l
Monitoring eth0...    (press CTRL-C to stop)
 ...

ちゃんと動くようになりました:blush:

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1