ネットワーク監視 · 4 min read · Dec 07, 2025
Debian 11にOpenNMS Horizonネットワーク監視システムをインストールする方法

OpenNMSは、無料でオープンソースの、中央の場所からリモートデバイスを監視するために使用される最も強力なネットワーク監視およびネットワーク管理プラットフォームの1つです。プロビジョニング、サービス監視、イベント管理、チャートサポートなど、多くの機能をサポートしています。OpenNMSはSNMPとJMXを使用し、リモートシステムから情報を収集します。LinuxおよびWindowsオペレーティングシステム上で動作し、簡単な監視のためのWebベースのインターフェースを提供します。
このチュートリアルでは、Debian 11にOpenNMSをインストールする方法を示します。
前提条件
- Debian 11を実行しているサーバー。
- サーバーIPにポイントされた有効なドメイン名。
- サーバーに設定されたrootパスワード。
Debian 11にJavaをインストールする
OpenNMSはJavaベースのアプリケーションです。したがって、サーバーにJavaをインストールする必要があります。インストールされていない場合は、次のコマンドを実行してインストールできます。
apt-get install default-jdk -yJavaがインストールされたら、以下のコマンドを使用してJavaのバージョンを確認します。
java --version以下の出力でJavaのバージョンが表示されます。
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.13+8-post-Debian-1deb11u1, mixed mode, sharing)
Debian 11にOpenNMSをインストールする
デフォルトでは、OpenNMSはDebian 11のメインリポジトリには含まれていません。したがって、APTにOpenNMSの公式リポジトリを追加する必要があります。
まず、次のコマンドを使用して必要な依存関係をすべてインストールします。
apt-get install curl gnupg2 wget -yすべてのパッケージがインストールされたら、以下のコマンドを使用してOpenNMSリポジトリファイルを作成します。
nano /etc/apt/sources.list.d/opennms.list以下の行を追加します。
deb https://debian.opennms.org stable main
deb-src https://debian.opennms.org stable main
ファイルを保存して閉じたら、次のコマンドを使用してGPGキーをインポートします。
wget -O - https://debian.opennms.org/OPENNMS-GPG-KEY | apt-key add -以下の出力が表示されます。
Connecting to debian.opennms.org (debian.opennms.org)|3.214.84.83|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1335 (1.3K)
Saving to: ‘STDOUT’
- 100%[=================================================================>] 1.30K --.-KB/s in 0s
2021-11-28 07:58:07 (16.0 MB/s) - written to stdout [1335/1335]
OK
次に、リポジトリキャッシュを更新し、以下のコマンドを使用してOpenNMSをインストールします。
apt-get update -y
apt-get install opennms -yインストール中に以下のエラーが表示されます。
Failed to install iplike into the template1 or opennms databases. See /tmp/install_iplike.log for details. To skip this step and install manually, set the
environment variable SKIP_IPLIKE_INSTALL before installing this package. To install iplike into your database, use the /usr/sbin/install_iplike.sh script. See `install_iplike.sh -h` for more details.
このエラーを解決するには、PostgreSQLでOpenNMS用のデータベースとユーザーを作成する必要があります。
PostgreSQLにデータベースを作成する
PostgreSQLサーバーは、OpenNMSのインストールプロセス中に自動的にインストールされます。
まず、以下のコマンドを使用してPostgreSQLサービスを開始します。
systemctl start postgresql次に、以下のコマンドを使用してPostgreSQLインスタンスに接続します。
su - postgres接続したら、以下のコマンドを使用してOpenNMS用のユーザーを作成し、パスワードを設定します。
createuser opennms
psql -c "ALTER USER opennms WITH PASSWORD 'opennms';"次に、OpenNMS用のデータベースを作成し、postgresユーザーのパスワードを設定します。
createdb -O opennms opennms
psql -c "ALTER USER postgres WITH PASSWORD 'securepassword';"次に、以下のコマンドを使用してPostgreSQLシェルから退出します。
exit作業が完了したら、次のステップに進むことができます。
OpenNMSを構成する
次に、OpenNMSデータソースファイルを編集し、データベースの資格情報を定義する必要があります。
nano /usr/share/opennms/etc/opennms-datasources.xml以下のようにデータベースの資格情報を定義します。
作業が完了したらファイルを保存して閉じ、以下のコマンドを実行してJava環境を検出します。
sudo -u opennms /usr/share/opennms/bin/runjava -s以下の出力が表示されます。
runjava: Looking for an appropriate JVM...
runjava: Checking for an appropriate JVM in JAVA_HOME...
runjava: Skipping... JAVA_HOME not set.
runjava: Checking JVM in the PATH: "/etc/alternatives/java"...
runjava: Did not find an appropriate JVM in the PATH: "/etc/alternatives/java"
runjava: Searching for a good JVM...
runjava: Found a good JVM in "/usr/lib/jvm/java-11-openjdk-amd64/bin/java".
runjava: Value of "/usr/lib/jvm/java-11-openjdk-amd64/bin/java" stored in configuration file.
次に、以下のコマンドを実行してOpenNMSのセットアップを完了します。
sudo -u opennms /usr/share/opennms/bin/install -dis以下の出力が表示されます。
Finished in 0 seconds
Processing RemotePollerServiceConfigMigratorOffline: Remove deprecated RemotePoller service entry from service-configuration.xml, see NMS-12684
- Running pre-execution phase
Creating backup of /usr/share/opennms/etc/service-configuration.xml
Zipping /usr/share/opennms/etc/service-configuration.xml
- Running execution phase
Current configuration: 32 services.
A service entry named 'OpenNMS:Name=PerspectivePoller' already exists.
Final configuration: 32 services.
- Saving the execution state
- Running post-execution phase
Removing backup /usr/share/opennms/etc/service-configuration.xml.zip
Finished in 0 seconds
Upgrade completed successfully!
OpenNMSサービスを開始する
OpenNMSのセットアップが完了したら、OpenNMSサービスを開始し、システム再起動時に自動的に開始されるように設定します。
systemctl start opennms
systemctl enable opennms以下のコマンドを使用してOpenNMSのステータスを確認できます。
systemctl status opennms以下の出力が表示されます。
? opennms.service - OpenNMS server
Loaded: loaded (/lib/systemd/system/opennms.service; disabled; vendor preset: enabled)
Active: active (running) since Sun 2021-11-28 08:10:51 UTC; 16s ago
Process: 22990 ExecStart=/usr/share/opennms/bin/opennms -s start (code=exited, status=0/SUCCESS)
Main PID: 24106 (java)
Tasks: 68 (limit: 4679)
Memory: 559.2M
CPU: 48.083s
CGroup: /system.slice/opennms.service
??24105 bash /usr/share/opennms/bin/opennms -s start
??24106 /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-modules=java.base,java.compiler,java.datatransfer,java.desktop,java.in>
Nov 28 08:11:02 debian11 opennms[24106]: [DEBUG] System property 'opennms.library.jicmp' set to '/usr/lib/jni/libjicmp.so. Attempting to loa>
Nov 28 08:11:02 debian11 opennms[24106]: [INFO] Successfully loaded jicmp library.
Nov 28 08:11:02 debian11 opennms[24106]: [DEBUG] System property 'opennms.library.jicmp6' set to '/usr/lib/jni/libjicmp6.so. Attempting to l>
Nov 28 08:11:02 debian11 opennms[24106]: [INFO] Successfully loaded jicmp6 library.
Nov 28 08:11:02 debian11 opennms[24106]: [DEBUG] System property 'opennms.library.jicmp' set to '/usr/lib/jni/libjicmp.so. Attempting to loa>
Nov 28 08:11:02 debian11 opennms[24106]: [INFO] Successfully loaded jicmp library.
Nov 28 08:11:02 debian11 opennms[24106]: [DEBUG] System property 'opennms.library.jicmp6' set to '/usr/lib/jni/libjicmp6.so. Attempting to l>
Nov 28 08:11:02 debian11 opennms[24106]: [INFO] Successfully loaded jicmp6 library.
Nov 28 08:11:07 debian11 opennms[24106]: Nov 28, 2021 8:11:07 AM org.hibernate.validator.internal.util.Version
Nov 28 08:11:07 debian11 opennms[24106]: INFO: HV000001: Hibernate Validator 4.3.2.Final
この時点で、OpenNMSは起動し、ポート8980でリッスンしています。以下のコマンドで確認できます。
ss -antpl | grep 8980以下の出力が表示されます。
LISTEN 0 50 *:8980 *:* users:(("java",pid=24106,fd=1046))
OpenNMSのリバースプロキシとしてNginxを構成する
次に、OpenNMSのリバースプロキシとしてNginxをインストールして構成することをお勧めします。まず、以下のコマンドを使用してNginxサーバーをインストールします。
apt-get install nginx -yNginxがインストールされたら、Nginxの仮想ホスト構成ファイルを作成します。
nano /etc/nginx/conf.d/opennms.conf以下の構成を追加します。
server {
listen 80;
server_name opennms.example.com;
access_log /var/log/nginx/opennms.access.log;
error_log /var/log/nginx/opennms.error.log;
location /
{
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-OpenNMS-Server-URL https://nms.hacc.edu/;
proxy_pass http://server-ip:8980;
}
}
ファイルを保存して閉じたら、構成エラーがないかNginxを検証します。
ginx -t以下の出力が表示されます。
ginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
次に、変更を適用するためにNginxサービスを再起動します。
systemctl restart nginxNginxの実行状態を確認するには、以下のコマンドを実行します。
systemctl status nginx以下の出力が表示されます。
? nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-11-28 08:17:14 UTC; 6s ago
Docs: man:nginx(8)
Process: 25964 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 25965 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 25967 (nginx)
Tasks: 3 (limit: 4679)
Memory: 3.2M
CPU: 53ms
CGroup: /system.slice/nginx.service
??25967 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
??25968 nginx: worker process
??25969 nginx: worker process
Nov 28 08:17:14 debian11 systemd[1]: Starting A high performance web server and a reverse proxy server...
Nov 28 08:17:14 debian11 systemd[1]: Started A high performance web server and a reverse proxy server.
OpenNMSダッシュボードにアクセスする
今、Webブラウザを開き、URL http://opennms.example.comを使用してOpenNMSのWebインターフェースにアクセスします。OpenNMSのログインページが表示されるはずです。

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

次に、admin > パスワード変更をクリックして、デフォルトのadminパスワードを変更します。

デフォルトのパスワードを変更し、送信ボタンをクリックします。次の画面が表示されるはずです。

結論
おめでとうございます!Debian 11サーバーにNginxをリバースプロキシとして使用してOpenNMSを正常にインストールしました。これで、リモートデバイスをOpenNMSに追加し、Webブラウザから監視を開始できます。質問があればお気軽にお尋ねください。
新しい投稿を受信箱で受け取る
スパムはありません。いつでも購読を解除できます。