Video surveillance is an important component of security. Cameras are installed in apartments and common corridors, country houses and garages. The company’s management monitors the staff, security for visitors. The care need of elderly relatives and small children. A simple picture is not enough to sit in front of the monitor all the time, no one can. Need a system that will analyze the video stream, makes a screenshot and notify owners of the violation of the perimeter.
Industrial modules cost a lot of money, but the open source community offers its own free alternative, a program such as ZoneMinder. In this article we will discuss how to install ZoneMinder Ubuntu 18.04.
- How to install ZoneMinder in Ubuntu
- Configuring ZoneMinder
How to install ZoneMinder in Ubuntu
The first thing in a fresh install of the OS, you must install the standard stack of web server, LAMP. To elaborate on this process, we will not be on the website this in a separate article. In order to receive the latest version of ZoneMinder, you must connect the personal archive of the developers PPA with the command:
sudo add-apt-repository ppa:iconnor/zoneminder-1.34
Here 1.34 – the current version number of the program. Not to enter the command sudo before all the following commands, we recommend you run the console command:
All of the following instructions in the console will be executed as root.
Now, the repository added. Now you need to update the list of packages and the operating system itself:
Then you can run the installer:
apt-get install zoneminder
In a fresh install of the operating system need to install about 200 packages, so the process will take some time. After installing ZoneMinder, you need to configure for user www-data permissions to access the configuration:
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
Next, you should allow access to the directory with the files that ZoneMinder:
chown-R www-data:www-data /usr/share/zoneminder/
Then configure Apache to connect to the core web server modules using the command:
Then add the settings with the command:
To speed up caching it is recommended to activate the modules expires and headers:
Before following persistent requests from Apache to restart, you must enable and start the ZoneMinder using the commands:
systemctl enable zoneminder
systemctl start zoneminder
Command start works without messages, so you can check the status of service by executing the command:
systemctl status zoneminder
The screen will display line, indicating that CCTV ZoneMinder active.
It remains to establish the correct time zone for php. Open the desired file in the editor Nano with the command:
Then press the key combination Ctrl-W, the white box, enter the word Date, press Enter. We proceed thus to the section [Date]. Remove the symbol “;” before the line of date.timezone and set our time zone. Moscow is Europe/Moscow. The contents of the file should look like the screenshot:
To exit the editor press the key combination Ctrl-X, confirm the save edited our php file.ini. Now you can restart the web server with the command:
systemcltl reload apache2
Install ZoneMinder Ubuntu Server has been completed. Finally, we can look at the results of their labors. Start the browser, the transition performed at the web server, in our case it is http://localhost/zm. In the opened window, agree that the program will collect the data and then get into the ZoneMinder console:
The first thing it is advisable to do is to put the login password. If the server is deployed in a public network is mandatory. Select Options in the menu bar and follow the link System on the left panel.
In the opened window, set the checkbox next to OPT_USE_AUTH and save the configuration with the button Save in the lower right corner of the page. If you refresh the page by pressing F5, will be executed immediately transition to the login form. The default is: username: admin, password: admin. To change this by clicking in the left pane of the link Users.
Most real cameras will be connected over the network. For the sample use of old smartphone with the software installed the IP Webcam.
To connect the camera to ZoneMinder Ubuntu press the main menu button ADDopens a window with a interface to add the camera.
On the tab General fill in the fields Source Type = Remote Function = Monitor (playback mode). Then go to the tab Source and set the parameter values as shown in the screenshot:
- Protocol = HTTP (if the smartphone you choose this Protocol);
- Method = Simple;
- Host Name = 192.168.0.184 (this is the address of a smartphone with a camera);
- Port = 8080 (as in the smartphone);
- Path = /video;
- Capture Resolution (pixels) = 320×240 (must match the camera stream).
To save settings, click SAVE. The program returns us to the list of cameras. If the stream is connected, the camera name and address will appear as green, if not red. Connection error you can see in the menu Log.
To start viewing images from the camera by clicking the mouse on the name of the camera. Opens the preview window.
The window is scaled, the launch broadcast, the testing events. On this basic setup ZoneMinder is finished.
We considered installing ZoneMinder Ubuntu 18.04 showed that the organization of video surveillance is not difficult. While the software package with great features it can be free too, and its power and convenience – in flexible settings.
Built-in module for web server receives streams of video from any local or networked cameras, analyze the footage in search of events for day and night shoots, and informs users about events and other things. Video surveillance is managed through a browser or mobile application, the data is stored in the local database. Suitable for building surveillance systems of any scale – from the garage to the enterprise.