Zoneminder is an open-source security system software that turns your personal computer into a video surveillance system. In this tutorial, we will show you how to install Zoneminder on Void Linux.
Before we proceed with the installation, ensure that you have the following:
The first step is to update the system:
sudo xbps-install -Suy
We'll need a few packages to install and run Zoneminder. Run the following command to install the necessary packages:
sudo xbps-install -y zoneminder apache php php-mysql libjpeg-turbo-devel gcc make git mariadb-server
Zoneminder needs a database to store its data, so we need to set up MariaDB on our Void Linux system. Run the following commands to start and enable the MariaDB server:
sudo ln -s /etc/sv/mariadb /var/service/
sudo sv start mariadb
sudo sv enable mariadb
Next, run the following command to set up a root password for MariaDB:
sudo mysql_secure_installation
You will be prompted to enter a root password, remove anonymous users, prevent root login remotely, and delete test databases. Follow the prompts to complete the installation.
Zoneminder requires Apache to be configured properly for it to function correctly. Run the following commands to make the required changes to the Apache configuration file:
sudo sed -i 's/^#LoadModule rewrite_module/LoadModule rewrite_module/' /etc/httpd/conf/httpd.conf
sudo sed -i 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf
sudo sed -i 's/^#ServerName www.example.com:80/ServerName localhost:80/' /etc/httpd/conf/httpd.conf
After making the changes to the configuration file, restart Apache:
sudo sv restart apache
Clone the Zoneminder Github repository and build Zoneminder on the local system. Run the following commands:
git clone https://github.com/ZoneMinder/zoneminder.git zoneminder
cd zoneminder
git checkout master
./bootstrap.sh
./configure --with-webuser=apache --with-webgroup=apache
make
sudo make install
We need to create a Zoneminder database account and database. Run the following commands:
mysql -u root -p
CREATE DATABASE zm;
CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';
GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost';
FLUSH PRIVILEGES;
exit
Edit the Zoneminder configuration file /usr/local/etc/zm.conf
. Update the following lines in the file:
ZM_DB_HOST=localhost
ZM_DB_NAME=zm
ZM_DB_USER=zmuser
ZM_DB_PASS=zmpass
After saving the changes, run the following command to create required Zoneminder directories:
sudo mkdir /var/cache/zoneminder /var/log/zm
sudo chown -R apache:apache /var/cache/zoneminder /var/log/zm
Finally, restart the server to apply all the changes:
sudo reboot
In this guide, we have learned how to install and configure Zoneminder on the Void Linux operating system. Zoneminder is now installed and ready to use as a security surveillance system.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!