Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

ZM has always had issues IMO during install w/ a bunch of hacks to fix, I'm now using docker vs manual setup.

Ubuntu via IConner PPA:

https://wiki.zoneminder.com/Ubuntu

sudo su
apt install -y software-properties-common
echo "" | add-apt-repository ppa:iconnor/zoneminder-master
apt-get update
apt-get install -y zoneminder

Note: This is the latest/best method IMO using NGinX/MariaDB backends

https://wiki.zoneminder.com/Ubuntu_Server_18.04_64-bit_with_Zoneminder_1.32.x_the_easy_way#Ubuntu_18.04_LEMP_.28NGNIX.2C_Mariadb.2C_PHP.29 

Notes from that url:

#ZM Install
apt install -y software-properties-common
echo "" | add-apt-repository ppa:iconnor/zoneminder-master
apt-get update
apt-get install -y zoneminder nginx mariadb-server php-fpm php-mysql fcgiwrap
##PHP Seutp
#cgi.fix_pathinfo=0
sed -i -e 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php/7.2/fpm/php.ini
cat /etc/php/7.2/fpm/php.ini | grep cgi.fix_pathinfo
#date.timezone = America/New_York
sed -i -e 's/;date.timezone/date.timezone/g' /etc/php/7.2/fpm/php.ini
sed -i 's,^\(date.timezone[ ]*=\).*,\1'America/Whitehorse',g' /etc/php/7.2/fpm/php.ini
cat /etc/php/7.2/fpm/php.ini | grep timezone
##ZM Setup
chown -R www-data:www-data /usr/share/zoneminder/

#ZM_PATH_ZMS=/cgi-bin/nph-zms
sed -i -e 's|ZM_PATH_ZMS=/zm/cgi-bin/nph-zms|ZM_PATH_ZMS=/cgi-bin/nph-zms|g' /etc/zm/conf.d/01-system-paths.conf
cat /etc/zm/conf.d/01-system-paths.conf | grep ZM_PATH_ZMS
systemctl enable zoneminder
service zoneminder start
systemctl status zoneminder
#NGinX
#index.php
sed -i -e 's/index.nginx-debian.html;/index.nginx-debian.html index.php;/g' /etc/nginx/sites-available/default
cat /etc/nginx/sites-available/default | grep index.php
#DAEMON_OPTS=-c 10 (where 10 = num of cameras)
echo "DAEMON_OPTS=-c 10" >> /etc/default/fcgiwrap
systemctl restart fcgiwrap


Forward domain.com to domain.com/zm

sh -c 'echo "RedirectMatch ^/$ /zm/" >> /etc/apache2/apache2.conf' && service apache2 restart
  • No labels