【NVR】zoneminder(1.32)のインストール・設定手順のまとめ(Ubuntu 18.04)
この内容は、Linux系のフリーのNVRソフトウェアであるzoneminder(1.32)を使用し、インストール方法や設定手順等の使い方を纏めた物です。
本ソフトウェアは色々出来る事から随時追加していきたいと思いますが、当方の構成環境により直ぐに更新出来ない物もありますので予め御了承下さい。
尚、カメラについては現在のところ以下の物で動作を確認しております。
・IPカメラ(ONVIF対応)
又、OSには”Ubuntu Server 18.04 LTS”を使用しています。
0.目次
1.zoneminderとは
2.環境について
3.zoneminderのインストール手順
1.zoneminderとは
zoneminderとは、冒頭でも述べたフリーのNVRソフトウェアです。
稼動対象OSは2018/11現在でUbuntu、RedHat、Debian、Gentoo、Source,Mobile App等に対応していますが、Windowsだけには非対応です。
以前にWindowsでISpy環境を構築しましたが、今回はUbuntuを使ってzoneminder環境を構築した纏めです。
●zoneminderサイト
・「Wiki(外部):https://wiki.zoneminder.com/Welcome」
※※2020/07/10 追記
現在の最新版での組み合わせであるUbuntu20.04とZoneMinder1.34でのインストール手順等以下に作成しました。
・【NVR】zoneminder(1.34)のインストール・設定手順のまとめ(Ubuntu 20.04)
2.環境について
1)検証環境について
検証環境について以下の通りです。○PC
・NEC VersaPro VK-26M/B-F(元ジャンクPC)
※元ジャンクPCについての詳細はこちらをご確認下さい
○OS
・Ubuntu Server 18.04 LTS
○zoneminder
・1.32(1.32.2)
○IPcamera
・1台目
「SV3C製1080P POE対応IPカメラ(SV-B01POE-1080P-L)」
・2台目
「SV3C製1080P POE対応IPカメラ(SV-B06POE-1080P-A)」
○ネットワーク図
○その他
・クライアントPCにTeratermをインストールし、そこから作業及び動作確認を実施
2)前提条件
前提条件として、OS(Ubuntu)のインストール等が完了している事とします。尚、当方の実施手順については、以下の記事で纏めてあります。
①【Ubuntu 18.04】Ubuntu18.04のインストール手順
②【Ubuntu 18.04】Ubuntu18.04での無線lan設定方法
3)特記事項
動作確認(検証)を目的としている為、セキュリティは最低限です。別途其のあたりも考慮したいとは考えておりますが、まずは試しに使う事を目的としておりますので、そこを考慮し自己責任で利用願います。
それでは、早速作業に掛かります。
3.ZoneMinderのインストール手順
1)前準備
①taskselのインストール
※次のlamp-serverインストールの為、taskselをインストールします。
"sudo apt -y install tasksel"
②lamp-serverの導入
※lamp=「Linux」+「Apache」+「MySQL」+「PHP」の頭文字をあわせたもので、ZoneMinderのインストールに必要です。
"sudo tasksel install lamp-server"
③sources.listへの対象確認(変更前)
"cat /etc/apt/sources.list"
→○"/etc/apt/sources.list"の内容(変更前)
deb http://archive.ubuntu.com/ubuntu bionic main deb http://archive.ubuntu.com/ubuntu bionic-security main deb http://archive.ubuntu.com/ubuntu bionic-updates main |
④sources.listへの追加
"sudo vi /etc/apt/sources.list"
※先の3行の”main”の後ろに” multiverse restricted universe”を追加します。
これをしないとインストール時に依存関係のエラーが出ます。
尚、mainとmultiverseの間にスペース(半角)を忘れないで下さい。
ちなみにこの追加はリポジトリの対象を増やす模様です。
⑤sources.listへの対象確認(変更後)
※変更後は以下の様になります
"cat /etc/apt/sources.list"
→○"/etc/apt/sources.list"の内容(変更後)
deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe |
⑥権限の昇格
”sudo su -”
⑦zoneminderインストール用シェルの作成
※Wikiを参考にshellを作成します。
例:"vi zm-install"
尚、Wikiではエディターにnanoを使用していますが、当方はviを使用しています。
(ご自分の使いやすいエディターを使用して下さい)
●zoneminderサイト
・「Wiki Ubuntu Server 18.04 64-bit with zoneminder1.32.x the easy way(外部)」
○zm-instalの中身
#!/bin/sh clear read -p "Zoneminder 1.32.x on Ubuntu 18.04 AMD64 with LAMP (MySQL) installed... Press Enter to continue or Ctrl + c to quit" nothing clear read -p "You must be logged in as root using sudo su ... Press Enter to continue or Ctrl + c to quit" nothing clear read -p "install and configure the system to run Zoneminder. Press enter to continue" nothing apt install -y software-properties-common clear add-apt-repository ppa:iconnor/zoneminder-1.32 apt update clear awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini clear apt install -y zoneminder systemctl enable zoneminder service zoneminder start adduser www-data video a2enconf zoneminder a2enmod rewrite chown -R www-data:www-data /usr/share/zoneminder/ service apache2 reload clear read -p "Install complete.Press enter to continue" nothing clear |
⑧アクセス権の変更
"chmod 755 zm-install"
⑨シェルの実行
"./zm-install"
→確認が来るので[Enter]を入力
※4回確認が来ますので[Enter]キーを押下します。
その後、インストール処理が進み、「Install complete.Press enter to continue」が表示されればインストールは完了です。
→[Enter]キーを押下します。
⑩動作確認(その1)
ブラウザで対象サーバにアクセスし、zoneminderのサイトが表示されれば完了です。
接続url:<サーバIP>/zm
尚、初回のみ次の様な画面が表示されます。
○説明画面(その1)
⑪動作確認(その2)
そのまま画面を下にスクロールし、右下の「APPLY」を押下します。
○説明画面
⑫画面が変り、メイン画面が表示されたらインストール作業は完了です。
○メイン画面
後はIPカメラ等の登録を行えば良いのですがそれは次回以降に説明します。
○おまけ(IPカメラ接続検証中の一例)
登録等の記事はこちらで作成しました。
全てではありませんが、参考にして下さい。
・【NVR】zoneminder(1.32)の設定手順のまとめ(Ubuntu 18.04)
以上
○更新履歴
2018/11/11 初版
2018/11/25 誤字脱字の修正
2018/12/02 2台目のIPカメラについて追加
2018/12/10 誤字脱字の修正
2020/07/10 Ubuntu20.04とZoneMinder1.34のリンクを追加
タグもどき:VK-26M/B-F Ubuntu 18.04 Ubuntu zoneminder1.32
PR