Network/zm setup notes
From Makers Local 256
Overview
Steps to configure a zoneminder integration.
- Install the latest debian (currently stretch)
- As root, install sudo, create a user, add it to sudoers
- Install zoneminder
- sudo apt update
- sudo apt upgrade
- sudo apt dist-upgrade
- sudo apt install php mariadb-server php-mysql libapache2-mod-php7.0
- sudo mysql_secure_installation
- sudo cp /etc/mysql/mariadb.conf.d/50-server.cnf /etc/mysql/my.cnf
- sudo nano /etc/mysql/my.cnf
- character-set-server = latin1
- collation-server = latin1_swedish_ci
- sudo service mariadb restart
- sudo nano /etc/apt/sources.list
- deb http://www.deb-multimedia.org stretch main non-free
- sudo apt install deb-multimedia-keyring
- wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
- sudo dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
- sudo apt update
- sudo apt upgrade
- sudo apt dist-upgrade
- sudo apt install zoneminder vlc-plugin-base php7.0-gd
- sudo chmod 740 /etc/zm/zm.conf
- sudo chown root:www-data /etc/zm/zm.conf
- systemctl enable zoneminder.service
- sudo adduser www-data video
- sudo systemctl start zoneminder.service
- sudo systemctl status zoneminder.service
- sudo a2enmod cgi
- sudo a2enmod rewrite
- sudo a2enconf zoneminder
- sudo sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.0/apache2/php.ini
- sudo chown -R www-data:www-data /usr/share/zoneminder/
- sudo service apache2 restart
- Modify zoneminder to use the Makers LDAP
- sudo a2enmod ldap
- sudo a2enmod authnz_ldap
- sudo nano /etc/apache2/conf-available/zoneminder.conf
- FIRST
- change line with ScriptAlias to 'ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin"' by adding "/zm"
- Then append the following to the bottom of the config file
- <Location /zm>
- AuthType Basic
- AuthBasicProvider ldap
- AuthLDAPURL ldap://newldap.256.makerslocal.org/dc=makerslocal,dc=org?uid
- AuthName "LDAP user plz"
- AuthType Basic
- Require valid-user
- </Location>
- FIRST
- sudo systemctl status apache2.service
- sudo systemctl restart apache2
- sudo hostnamectl set-hostname zoneminder
- sudo vim /etc/network/interfaces -> change nameserver to 10.56.0.1
- sudo vim /etc/network/interfaces -> set the ip to static 10.56.0.19
- auto enp3s0
- iface enp3s0 inet static
- address 10.56.0.19
- gateway 10.56.0.1
- netmask 255.255.255.0
- log into the new ZM using your ML256 creds and modify the options to match the old zm
- ensure the PATH_ZMS on the Paths tab is "/zm/cgi-bin/nph-zms", among other things.
- The PC was then connected to the DMZ net (200) by updating a switch port on the ProCurve switch to use that network.
- The old vm was shut down, and the PC was booted
- Success!
Next Steps
- Think about adding new ZM to 10.56.0.255 subnet (currently on *.1.255 subnet)
- Point website at new ZM
- Change shop-proxy forwarding to point "/zm/" to new ZM