監視ツール · 5 min read · Dec 03, 2025
Ubuntu 20.04にPandora FMS監視ツールをインストールする方法

Pandora FMSは「Pandora Flexible Monitoring System」としても知られており、サーバー、ネットワーク、アプリケーション、仮想インフラストラクチャのための監視ツールです。シンプルでスケーラブルであり、複雑で大規模な環境に適しています。TCP、UDP、SNMP、HTTPなどの複数のプロトコルとエージェントを使用して、さまざまなメトリックを収集します。Pandora FMSを使用して、Webサーバー、データベースサーバー、アプリケーション、ルーター、その他のネットワークデバイスの状態とパフォーマンスを監視できます。
このチュートリアルでは、Ubuntu 20.04にPandora FMSをインストールして構成する方法を示します。
前提条件
- Ubuntu 20.04を実行しているサーバー。
- サーバーIPにポイントされた有効なドメイン名。
- サーバーに設定されたルートパスワード。
始めに
まず、システムパッケージを最新のバージョンに更新することをお勧めします。次のコマンドで更新できます:
apt-get update -yすべてのパッケージが更新されたら、次のコマンドでPandora FMSに必要なすべての依存関係をインストールします:
apt-get install snmp snmpd libnet-telnet-perl libgeo-ip-perl libtime-format-perl libxml-simple-perl libxml-twig-perl libdbi-perl libnetaddr-ip-perl libhtml-parser-perl xprobe2 nmap libmail-sendmail-perl traceroute libio-socket-inet6-perl libhtml-tree-perl libsnmp-perl snmp-mibs-downloader libio-socket-multicast-perl libsnmp-perl libjson-perl -yLAMPサーバーのインストール
次に、Apacheサーバー、MariaDB、PHP、およびその他の必要な依存関係をシステムにインストールする必要があります。次のコマンドを使用してすべてをインストールできます:
apt-get install apache2 mariadb-server php php-common php-gmp php-curl php-mbstring php-xmlrpc php-mysql php-gd php-bcmath php-xml php-cli php-zip php-pear php-zip php-sqlite3 php-snmp php-db graphviz php-curl php-ldap dbconfig-common unzip git -yすべてのパッケージをインストールした後、php.iniファイルを編集して推奨設定を定義します:
nano /etc/php/7.4/apache2/php.ini次の行を変更します:
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
max_input_vars = 2000
date.timezone = Asia/Kolkata完了したら、次のステップに進むことができます。
MariaDBデータベースの構成
デフォルトでは、MariaDBのルートパスワードは設定されていません。したがって、システムで設定する必要があります。次のスクリプトを実行することでそれを行うことができます:
mysql_secure_installationルートパスワードを設定するために、以下のようにすべての質問に答えます:
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Set root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y次に、次のコマンドでMariaDBシェルにログインします:
mysql -u root -pプロンプトが表示されたらルートパスワードを入力し、次のコマンドでmysql_native_passwordプラグインを有効にします:
MariaDB [(none)]> USE mysql;
MariaDB [(none)]> UPDATE user SET plugin='mysql_native_password' WHERE User='root';次に、次のコマンドでPandora用のデータベースとユーザーを作成します:
MariaDB [(none)]> CREATE DATABASE pandora;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON pandora.* to pandora@'localhost' IDENTIFIED BY 'pandora';次に、特権をフラッシュし、次のコマンドでMariaDBシェルから退出します:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;次に、/etc/mysql/my.cnfファイルを編集してsql_modeを定義する必要があります。
nano /etc/mysql/my.cnf次の行を追加します:
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION完了したらファイルを保存して閉じ、MariaDBサービスを再起動して変更を適用します:
systemctl restart mariadbPandoa FMSのダウンロード
次に、GitリポジトリからPandora FMSの最新バージョンをダウンロードする必要があります。次のコマンドでダウンロードできます:
cd /var/www/html/
git clone https://github.com/pandorafms/pandorafms.git次に、ダウンロードしたディレクトリに適切な権限と所有権を付与します:
chown -R www-data:www-data /var/www/html/pandorafms
chown -R www-data:www-data /var/www/html/pandorafms/pandora_console/
chmod -R 775 /var/www/html/pandorafms/pandora_console/次に、Pandoraの設定ファイルを編集します:
nano /var/www/html/pandorafms/pandora_console/include/config.inc.php次の行をコメント解除して、データベース設定に応じて変更します:
// Default values
$config["dbname"]="pandora";
$config["dbuser"]="pandora";
$config["dbpass"]="pandora";
$config["dbhost"]="localhost";
// This is used for reporting, please add "/" character at the end
// $config["homedir"]="/var/www/pandora_console/";
// $config["homeurl"]="/pandora_console/";
$config["auth"]["scheme"] = "mysql";完了したらファイルを保存して閉じます。
Pandora FMSのためのApacheの構成
次に、Pandora FMSを提供するための新しいApache仮想ホスト構成ファイルを作成する必要があります。次のコマンドで作成できます:
nano /etc/apache2/sites-available/pandora.conf次の行を追加します:
ServerAdmin [email protected]
ServerName pandora.linuxbuz.com
DocumentRoot /var/www/html/pandorafms/pandora_console
AllowOverride All
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
ファイルを保存して閉じたら、次のコマンドでPandora仮想ホストを有効にします:
a2ensite pandora次に、次のコマンドでApacheサービスを再起動して構成変更を適用します:
systemctl restart apache2Pandora FMSにアクセス
今、ウェブブラウザを開き、URL http://pandora.linuxbuz.com/install.php を入力してPandora FMSにアクセスします。以下のようにPandora FMSのWebインストールウィザードが表示されるはずです:

次へボタンをクリックします。次のページが表示されるはずです:

「はい、ライセンス条項に同意します」をクリックします。次のページが表示されるはずです:

すべてのPHP拡張がインストールされていることを確認し、次へボタンをクリックします。次のページが表示されるはずです:

ルートユーザー名、MariaDBルートパスワード、データベース名、Pandoraのパスを入力し、次へボタンをクリックします。次のページが表示されるはずです:

これはPandoraデータベースユーザーのパスワードを変更します。したがって、config.phpファイルに元のPandoraデータベースパスワードを定義する必要があります。
ターミナルを開き、config.phpファイルを編集します:
nano /var/www/html/pandorafms/pandora_console/include/config.php「$config[“dbpass”]」フィールドを元のパスワードに変更します:
// 自動設定ファイルの開始
$config["dbtype"] = "mysql"; //DBタイプ(mysql、postgresql...将来的には他のもの)
$config["mysqli"] = true;
$config["dbname"]="pandora";
$config["dbuser"]="pandora";
$config["dbpass"]="pandora";
$config["dbhost"]="localhost"; ファイルを保存して閉じます。次に、Pandoraインストールウィザードに戻り、次へボタンをクリックします。次のページが表示されるはずです:

次に、ターミナルを再度開き、install.phpファイルを削除します:
rm -rf /var/www/html/pandorafms/pandora_console/install.php次に、Pandora FMSインストールウィザードに戻り、「Pandora FMSコンソールにアクセスするにはここをクリック」をクリックします。Pandora FMSのログイン画面が表示されるはずです:

デフォルトの管理者ユーザー名をadmin、パスワードをpandoraとして入力し、ログインボタンをクリックします。次の画面にPandoraダッシュボードが表示されるはずです:

Let’s EncryptでPandora FMSを保護する
次に、Let’s Encrypt SSLでウェブサイトを保護することをお勧めします。まず、次のコマンドを使用してCertbotクライアントをインストールします:
apt-get install python3-certbot-apache -yインストールが完了したら、次のコマンドを実行してLet’s Encrypt SSLでウェブサイトを保護します:
certbot --apache -d pandora.linuxbuz.comメールアドレスを提供し、以下のようにサービス利用規約に同意するよう求められます:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for pandora.linuxbuz.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/pandora-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/pandora-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/pandora-le-ssl.conf次に、HTTPトラフィックをHTTPSにリダイレクトするかどうかを選択します:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 22を入力してEnterを押して、ウェブサイトにLet’s Encrypt SSLをインストールします:
Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/pandora.conf to ssl vhost in /etc/apache2/sites-available/pandora-le-ssl.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://pandora.linuxbuz.com
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=pandora.linuxbuz.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/pandora.linuxbuz.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/pandora.linuxbuz.com/privkey.pem
Your cert will expire on 2020-10-23. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all*
of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-leこれで、URL https://pandora.linuxbuz.com を使用してPandora FMSに安全にアクセスできます。
結論
おめでとうございます!Ubuntu 20.04サーバーにApacheとLet’s Encrypt SSLを使用してPandora FMS監視ツールを正常にインストールしました。これで、クライアントシステムを追加し、Pandora FMSから監視を開始できます。
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。