Tips

nagiosでフリーな監視をしてみよう!~nagiosの設定(2)~

nagiosでフリーな監視をしてみよう!~nagiosの設定(2)~

nconfをインストールする前の準備


nconfをインストールしていく前に、nconf用データベースと、MySQLへ接続するためのアカウントを作成しておきます。
具体例として、以下の内容で設定していきますが、適時値を変更してください。

項目 設定内容
データベース名 nconf
ユーザー名 nconf
パスワード nconfpass


(1)mysqlにアクセスします。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 4
Server version: 5.6.21 Source distribution
 
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
 
mysql>


(2)nconf用のデータベースを作成します。

1
2
mysql> create database nconf;
Query OK, 1 row affected (0.23 sec)


(3)nconf用のユーザーを作成します。

1
2
mysql> grant SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP on nconf.* to 'nconf'@'localhost' identified by 'nconfpass';
Query OK, 0 rows affected (0.09 sec)

nconfのインストール


nconfをインストールしていきます。


(1)「/usr/local/src」ディレクトリに移動し、wgetコマンドでソースコードをダウンロードします。


(3)ソースコードを解凍し、解凍したディレクトリを「/usr/local/apache2/htdocs」配下に移動します。
※移動するディレクトリは、あらかじめインストールされているapacheのドキュメントルートにあわせてください。

1
2
# tar zxf nconf-1.3.0-0.tgz
# mv nconf /usr/local/apache2/htdocs/


(4)ドキュメントルートに移動し、移動したディレクトリ「nconf」の所有者とグループを変更します。

1
2
# cd /usr/local/apache2/htdocs
# chown -R apache. nconf

Linux認定資格 LPICを取るなら・・

Linux資格 「LPIC Lv1」徹底解説 連載目次

Recent News

Recent Tips

Tag Search