Ubuntu14.04にmuninをインストールする(ローカル環境)
muninがどんなものなのかテストとしてsingle serverにインストールしてみる手順です
手順
1. Apache install
apt-get update apt-get install apache2 apt-get install apache2-utils apache2 -v Server version: Apache/2.4.7 (Ubuntu) Server built: Jan 14 2016 17:45:23 ss -lntp | grep 80 LISTEN 0 128 :::80 :::* users:(("apache2",2605,4),("apache2",2604,4),("apache2",2601,4))
- http://#{IPアドレス}/にアクセスしてApacheの設定pageが表示されることを確認
- この時点ではhttp://#{IPアドレス}/munin/にアクセスしても当然何も見れない
2. munin installation
apt-get install munin munin-node vi /etc/munin/munin.conf ### 98行目を自ホスト名に変更 98 [vagrant-ubuntu-trusty.vagrantup.com] 99 address 127.0.0.1 100 use_node_name yes vi /etc/munin/apache.conf ### 19行目にアクセス制限を追加 16 <Directory /var/cache/munin/www> 17 Order allow,deny 18 Allow from localhost 127.0.0.0/8 ::1 19 Allow from 192.168.33.12/24 20 Options None ### 以下の行をアンコメントアウト 30 AuthUserFile /etc/munin/munin-htpasswd 31 AuthName "Munin" 32 AuthType Basic 33 require valid-user /etc/init.d/munin start /etc/init.d/apache2 restart htpasswd -c /etc/munin/munin-htpasswd ubuntu New password: Re-type new password: Adding password for user ubuntu
- http://#{IPアドレス}/munin/にアクセスするとBasic認証のポップアップが出現するので、設定したパスワードでログインする
- ユーザ: ubuntu
- パスワード: #{設定したパスワード}
3. munin-nodeの設定
vi /etc/munin/munin-node.conf ### 37行目:自ホスト名に変更 37 host_name dlp.server.world /etc/init.d/munin-node stop /etc/init.d/munin-node start
4. 確認
しばらく待ってると以下のようにグラフの描画がはじまります