Page 1 of 1

Master Snapshots

Posted: Mon Aug 17, 2015 4:10 pm
by iconnor
I am switching to using packaging scripts that more closely follow debian's. This introduces some potential breakage, which is easily corrected.

Problem #1: zoneminder will not be automatically enabled in systemd. So after the update, zoneminder might not get started. To fix this do

sudo systemctl enable zoneminder

Problem #2: The cgi-bin dir has been moved from /usr/lib/cgi-bin to /usr/lib/zoneminder/cgi-bin. This will require editing your apache config.

Re: Master Snapshots

Posted: Wed Aug 19, 2015 6:36 pm
by iconnor
Addendums to this, now that I am releasing a new snapshot for ubuntu 1404.

apache2 config may contain old stuff. Look for /etc/apache2/conf-enable/zm.conf. You will want to remove it and do

a2enconf enable zoneminder

Also, in the options popup -> Paths, change PATH_ZMS to /zm/cgi-bin/nph-zms

The zmupdate scripts need to alter and create some tables. The zmuser account in mysql will need rights to do this.

Re: Master Snapshots

Posted: Wed Aug 19, 2015 7:36 pm
by bbunge
I set up a test with Ubuntu 15.04 and installed the version from the iconnor/zoneminder-master PPA. Did not have success...

The database did not install in MySQL. I had to manually add the zm database (see Debian 8.1 How To if you want to do this)

Was not able to find the config file mentioned in the first post above. Did not get ZM to start.

Will keep trying and report success or failure...

Re: Master Snapshots

Posted: Thu Aug 27, 2015 3:04 pm
by bbunge
Procedure for Ubuntu 14.04 using the master PPA

Add Repository

apt-get install software-properties-common python-software-properties

add-apt-repository ppa:iconnor/zoneminder-master

apt-get update

Install Zoneminder

apt-get install zoneminder

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

cd /usr/share/zoneminder/db

mysql --user=root --password=(root password) < zm_create.sql

mysql --user=root --password=(root password)

grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';

\q (enter) (to quit)

Set permissions of /etc/zm/zm.conf to root:www-data 740

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf


Add delay to allow MySQL to start before Zoneminder

nano /etc/init.d/zoneminder

Add sleep 15 as shown:

start() {
sleep 15
echo -n "Starting $prog: "

Ctrl+o Enter to save

CTRL+x to exit


Create a new user

adduser www-data video

Enable CGI and Zoneminder configuration in Apache.

a2enmod cgi

a2enconf zoneminder

Start Zoneminder

service zoneminder start


Restart Apache

service apache2 reload

Re: Master Snapshots

Posted: Thu Aug 27, 2015 7:15 pm
by bbunge
For Ubuntu 15.04

Add Repository

apt-get install software-properties-common python-software-properties

add-apt-repository ppa:iconnor/zoneminder-master

apt-get update

Install Zoneminder

apt-get install zoneminder

Create Zoneminder database in MySQL (Note: this also creates the default Zoneminder user and permissions in MySQL)

cd /usr/share/zoneminder/db

mysql --user=root --password=(root password) < zm_create.sql

mysql --user=root --password=(root password)

grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';

\q (enter) (to quit)

Set permissions of /etc/zm/zm.conf to root:www-data 740

chmod 740 /etc/zm/zm.conf

chown root:www-data /etc/zm/zm.conf

Enable Zoneminder service to start at boot

systemctl enable zoneminder.service

Create a new user

adduser www-data video

Start Zoneminder

systemctl start zoneminder.service

Check to see that Zoneminder is running

systemctl status zoneminder.service

Enable CGI and Zoneminder configuration in Apache.

a2enmod cgi

a2enconf zoneminder

Restart Apache

service apache2 restart