How to downgrade when desired version not in repo

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

How to downgrade when desired version not in repo

Post by NginUS »

I'm sorting through configuring a new install (to Mint 18.3), using version 1.32.3 from the iconnor zoneminder 1.32 PPA.

I've encountered an inability to use my rtsp camera, which appears to be related to the issue detailed in this [0] other thread here on the forums titled "RTSP not working after upgrade to 1.32.3".

I'd like to downgrade ZM to version 1.32.2, which is said to not be affected by that rtsp issue. However, when I look at the 'Versions' tab in ZM's Synaptic entry, I only have the current 1.32.3 & an older 1.29.0 available to choose from.

I'm not sure if the downgrade process would require any editing of config files or whatever other type of extra steps to make it work. With that in mind, I'm more comfortable with as small a version change as possible in hopes that it minimizes the chance for something going wrong.

Either way if I change to the 1.29.0 or 1.32.2, I need help from here- not sure how to proceed.

Thanks.


[0]
viewtopic.php?f=38&t=28006
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

Re: How to downgrade when desired version not in repo

Post by NginUS »

Is there a timeline I can watch to see how long we'll have to wait for 1.32.4?
bbunge
Posts: 2923
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: How to downgrade when desired version not in repo

Post by bbunge »

Recommend you go back to 1.30.4. Will mean you uninstall your current version of Zoneminder and drop the am database. See the wiki for an install script for 1.30.4 on your Ubuntu version.
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

Re: How to downgrade when desired version not in repo

Post by NginUS »

bbunge wrote: Fri Mar 01, 2019 5:42 pm Recommend you go back to 1.30.4. Will mean you uninstall your current version of Zoneminder and drop the am database. See the wiki for an install script for 1.30.4
The following is the script for 16.04:

Code: Select all

#!/bin/sh
clear
read -p "This script installs Zoneminder 1.30.4 on Ubuntu 16.04 AMD64 with LAMP (MySQL) installed. This uses install packages that were  downloaded from the Zoneminder PPA...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "You must be logged in as root using sudo su ...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will download the Zoneminder install packages, configure MySQL and PHP and install the downloaded packages.
Press enter to continue" nothing
wget --no-check-certificate https://173.163.189.225/php-apcu-bc_1.0.3-2xenial2_amd64.deb -P /tmp/
wget --no-check-certificate https://173.163.189.225/zoneminder-doc_1.30.4-xenial1_all.deb -P /tmp/
wget --no-check-certificate https://173.163.189.225/zoneminder_1.30.4-xenial1_amd64.deb -P /tmp/
clear
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.0/apache2/php.ini
echo "[mysqld]" >> /etc/mysql/my.cnf
echo "init_connect = 'SET @@sql_mode = CASE CURRENT_USER() WHEN \'zmuser@localhost\' THEN \'NO_ENGINE_SUBSTITUTION\' ELSE @@sql_mode END;'" >> /etc/mysql/my.cnf
systemctl restart mysql
apt-get -y install /tmp/php-apcu-bc_1.0.3-2xenial2_amd64.deb
apt-get -y install /tmp/zoneminder-doc_1.30.4-xenial1_all.deb
apt-get -y install /tmp/zoneminder_1.30.4-xenial1_amd64.deb
systemctl enable zoneminder
service zoneminder start
adduser www-data video
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
chown -R www-data:www-data /usr/share/zoneminder/
service apache2 reload
clear
read -p "Open Zoneminder in a web browser (http://server-ip/zm). 
Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms 
Click the Save button. 
Press enter to continue" nothing
clear
And I'm wondering about how I might either not use it or edit it to work properly with MariaDB & the existing database/user.

I originally installed via these instructions here [0], and I skipped the part where the "NO_ENGINE_SUBSTITUTION" is set- presumably to allow MariaDB to work in place of MySQL, though I don't know if it helped or not. For all I know that's why it fails to display my stream.

I'm not so adept with scripting to know how to properly edit this. Am wondering if I could just install those .deb's & re-use the existing configuration.

If someone more knowledgeable than I could comment I'd be grateful.

TIA...



[0]
https://zoneminder.readthedocs.io/en/st ... untu-16-04
bbunge
Posts: 2923
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: How to downgrade when desired version not in repo

Post by bbunge »

#!/bin/sh
clear
read -p "This script installs Zoneminder 1.30.4 on Ubuntu 16.04 AMD64 with Mariadb installed. This uses install packages that were downloaded from the Zoneminder PPA...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "You must be logged in as root using sudo su ...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will download the Zoneminder install packages, configure MySQL and PHP and install the downloaded packages.
Press enter to continue" nothing
wget --no-check-certificate https://173.163.189.225/php-apcu-bc_1.0 ... _amd64.deb -P /tmp/
wget --no-check-certificate https://173.163.189.225/zoneminder-doc_ ... l1_all.deb -P /tmp/
wget --no-check-certificate https://173.163.189.225/zoneminder_1.30 ... _amd64.deb -P /tmp/
clear
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.0/apache2/php.ini
apt-get -y install /tmp/php-apcu-bc_1.0.3-2xenial2_amd64.deb
apt-get -y install /tmp/zoneminder-doc_1.30.4-xenial1_all.deb
apt-get -y install /tmp/zoneminder_1.30.4-xenial1_amd64.deb
systemctl enable zoneminder
service zoneminder start
adduser www-data video
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
chown -R www-data:www-data /usr/share/zoneminder/
service apache2 reload
clear
read -p "Open Zoneminder in a web browser (http://server-ip/zm).
Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms
Click the Save button.
Press enter to continue" nothing
clear
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

Re: How to downgrade when desired version not in repo

Post by NginUS »

I ran that script at a root prompt, but it didn't ask me anything about setting database users, or anything regarding the database for that matter.

I get this error when I navigate to the ZM WebUI:

Code: Select all

Unable to connect to ZM db.SQLSTATE[HY000] [1045] Access denied for user 'zmuser'@'localhost' (using password: YES)

Also, I get this error when I try to start zoeminder.service:

Code: Select all

Failed to start zoneminder.service: Unit zoneminder.service is masked.

Googling talks about there being different names for MySQL services, but AFAIK, MariaDB works using "mysql" in the command just like normal. Not sure what I'm reading- to know what's relevant. :-(

EDIT:
Found more relevant terminal output, more on failed authentication:

Code: Select all

Setting up zoneminder (1.30.4-xenial1) ...
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
dpkg: error processing package zoneminder (--configure):
bbunge
Posts: 2923
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: How to downgrade when desired version not in repo

Post by bbunge »

Did you drop the prior zm database? You may be farther ahead to start over with a fresh Linux install.
NginUS
Posts: 9
Joined: Mon Feb 18, 2019 8:23 am

Re: How to downgrade when desired version not in repo

Post by NginUS »

bbunge wrote: Sun Mar 03, 2019 2:58 am Did you drop the prior zm database?
No. Same name, user, password. Wanted to re-use it but hadn't thought about what its contents might be.

I can make a fresh one & setup the user again- I took note of which specific permissions that user needed since I didn't want the ZM user same as root in there.

Might there be a ZM config file where I can define those values?

No clue about the systemd error, guessing that's a result of the dpkg --configure failure I'm seeing but could be wrong.
bbunge
Posts: 2923
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: How to downgrade when desired version not in repo

Post by bbunge »

Zoneminder uses its own user and password. Yes, it can be changed but does not pose a security risk for most users. Dumping the database does not mean the entire Mariadb. https://www.liquidweb.com/kb/delete-a-m ... mand-line/
Post Reply