To use ZoneMinder on a Raspberry Pi, follow these steps:
-
Prepare your Raspberry Pi:
- Ensure your Raspberry Pi is running the latest version of Raspberry Pi OS.
-
Update and Upgrade:
-
Install Apache, MySQL, and PHP (LAMP stack):
- Install Apache:
sudo apt install apache2
- Install MySQL:
sudo apt install mariadb-server
- Secure MySQL installation:
sudo mysql_secure_installation
- Install PHP and required modules:
sudo apt install php libapache2-mod-php php-mysql php-gd php-xml php-mbstring
-
Install ZoneMinder:
- Add the ZoneMinder repository:
sudo sh -c 'echo "deb http://www.deb-multimedia.org bullseye main non-free" >> /etc/apt/sources.list'
sudo apt update
sudo apt install deb-multimedia-keyring
sudo apt update
- Install ZoneMinder:
sudo apt install zoneminder
-
Configure ZoneMinder:
-
Database Setup:
- Create ZoneMinder database:
sudo mysql -uroot -p
Inside MySQL prompt:
CREATE DATABASE zm;
CREATE USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';
GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
- Import ZoneMinder database schema:
sudo mysql -uroot -p zm < /usr/share/zoneminder/db/zm_create.sql
-
Final Adjustments:
- Set the correct timezone in
php.ini
:
sudo nano /etc/php/7.4/apache2/php.ini
Find and set:
date.timezone = "Your/Timezone"
- Restart Apache:
sudo systemctl restart apache2
-
Access ZoneMinder:
- Open a web browser and go to
http://your_raspberry_pi_ip/zm
.
This should get ZoneMinder up and running on your Raspberry Pi. Adjustments may be necessary based on your specific setup and requirements.