Upgrade to Ubuntu 18.04, Bionic Solved!

Forum for questions and support relating to the 1.30.x releases only.
Locked
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Upgrade to Ubuntu 18.04, Bionic Solved!

Post by bbunge »

Edit 20APR18
I have run the upgrade procedure twice on a 16.04 LAMP (MySQL) server. As the procedure does not alter the database server it should work with Mariadb. I have been able to upgrade without loosing events on my test machine and everything seems to work afterwards.

See the upgrade procedure here:

https://wiki.zoneminder.com/Common_Issu ... _ZM_1.30.4

-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Folks,
With the impending release of Ubuntu Bionic 18.04, I'm sure there are a bunch of you chomping at the bit to upgrade your systems. The good news is that I have successfully installed Zoneminder 1.30.4 on Bionic server and desktop with MySQL or Mariadb. I have even used NGINX!

The bad news is that I've not been able to upgrade a system with Zoneminder installed and have everything work. My attempts have used Ubuntu 16.04 and Zoneminder 1.30.4 installed from the iconnor PPA. Zoneminder is not included in the Bionic repositories so the installed version of Zoneminder does not get overwritten or removed. In fact, Zoneminder runs and captures events (my USB camera has a led on and when I move in front of the camera there is the usual hard drive activity). I just get a blank screen when I try to view the web gui. I suspect it may have something to do with PHP 7.0 not being fully replaced by PHP 7.2.

Am posting this as a warning to not upgrade a production Zoneminder system untill we figure out how to fix it!

Comments/suggestions are welcome!

Thanks,

bb
Last edited by bbunge on Fri Apr 20, 2018 5:10 pm, edited 1 time in total.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Upgrade to Ubuntu 18.04, Bionic

Post by rockedge »

I was able to get a Bionic 18.04 Puppy Linux to run 1.31.40 and a Bionic 18.03 with ZM 1.31.1 to also run okay.
But it was not that easy.....I had to find out missing PERL modules and install them and did not have a smooth import of the zm_create.sql... or an error free zmupdate.pl run and there was more tweaking needed to get zmfilter.pl and zmtrigger.pl to run. I just returned home after a trip to Colorado and am just getting up to speed.
Last edited by rockedge on Wed Apr 11, 2018 12:15 am, edited 1 time in total.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Upgrade to Ubuntu 18.04, Bionic

Post by rockedge »

And the API works after the api fix is applied and when I test it...but zmNinja reports an API problem and won't get past the set up screens.

I am working with Hiawatha 10.8.1 and PHP 7.2.3 with a MariaDB on Bionic 18.04 Puppy Linux (Ubuntu binaries) ZM 1.31.40 at the moment.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Upgrade to Ubuntu 18.04, Bionic

Post by rockedge »

I am going to install 1.30.4 on a fresh set up of 18.04 Bionic running either
Apache 2.4.9 or Hiawatha 10.8.1 (which can interchange on the fly)
10.1.29-MariaDB-6 - Ubuntu 18.04
PHP version: 7.2.3-1ubuntu1

I will see if I can get it going and what it takes.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Upgrade to Ubuntu 18.04, Bionic

Post by rockedge »

I was able to install and run ZM 1.30.4 Zesty i386 on a Puppy Linux Bionic 18.04 with PHP 7.2.3
I used the API fix and the url http://localhost/zm/api/host/getVersion.json returns the correct response.
now to run it through the paces.... I down graded from a working 1.31.40 Bionic to ZM 1.30.4 Zesty
and dropped the database and created a new one with zm_create.sql v 1.30.4
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrade to Ubuntu 18.04, Bionic

Post by bbunge »

rockedge wrote: Wed Apr 11, 2018 9:14 pm I was able to install and run ZM 1.30.4 Zesty i386 on a Puppy Linux Bionic 18.04 with PHP 7.2.3
I used the API fix and the url http://localhost/zm/api/host/getVersion.json returns the correct response.
now to run it through the paces.... I down graded from a working 1.31.40 Bionic to ZM 1.30.4 Zesty
and dropped the database and created a new one with zm_create.sql v 1.30.4
Fresh installs are not a problem. Current instructions in the WIKI. Even have scripts that automate install. API fix included!
Problem is the upgrade from a prior version of Ubuntu.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Upgrade to Ubuntu 18.04, Bionic

Post by bbunge »

I think I have figured out a fix for the upgrade from 16.04 to 18.04!

Ubuntu 16.04 with Zoneminder 1.30.4. I did a:
do-release-upgrade -d

After a restart Zoneminder started but the web gui would not answer. The issue is that php7.2 did not get enabled in Apache2. To enable php7.2 run
a2enmod php7.2
service apache2 reload

But, there are some changes to php7.2 that requires a fix for the API to work. I have repackaged a zoneminder install with these fixes. Here is a shell script that will patch the upgrade to Bionic.

create a file something like:
nano upgrade
copy the contents below into the file and save it (Ctrl +o Ctrl + x) then make the file execuitable: chmod 755 upgrade
Run the file: ./upgrade

Contents of shell script
------------------------------------------------------------------------------------------------------------------
#!/bin/sh
clear
read -p "This script updates Zoneminder 1.30.4 on Ubuntu 18.04 with LAMP (MySQL) after an upgrade from Ubuntu 16.04...
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 package. This may take a minute to connect
Press enter to continue" nothing
wget --no-check-certificate 'https://docs.google.com/uc?export=downl ... zwtOcCiisX' -O /tmp/zoneminder-1.30.4-bionic-amd64.deb
ls /tmp/zoneminder*
read -p "Check above to be sure the file downloaded. Should be:
/tmp/zoneminder-1.30.4-bionic-amd64.deb (5686708)
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will add settings to PHP config files.
Press enter to continue" nothing
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini
clear
read -p "Now we will upgrade, enable and start Zoneminder.
Press enter to continue" nothing
apt-get -y --allow-downgrades install /tmp/zoneminder-1.30.4-bionic-amd64.deb
systemctl enable zoneminder
service zoneminder start
a2enmod php7.2
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 chech that PATH_ZMS is /zm/cgi-bin/nph-zms
Click the Save button.
Press enter to continue" nothing
clear
fcm
Posts: 1
Joined: Thu Aug 30, 2018 8:41 pm

Re: Upgrade to Ubuntu 18.04, Bionic Solved!

Post by fcm »

Thanks!! upgrade completed ok.
I also did `apt install php7.2-cgi` that was missing after the automatic UBUNTU upgrade.
Locked