Fresh 18.04 LTS Server puking on ZM install

Forum for questions and support relating to the 1.30.x releases only.
Locked
myurkoski
Posts: 19
Joined: Fri Aug 05, 2016 6:27 pm

Fresh 18.04 LTS Server puking on ZM install

Post by myurkoski »

Hello! Had a server meltdown and I'm putting everything back together today. With an absolutely pristine 18.04 LTS Server install, the installation fails. I'm doing the install per the 18.04 apache/MariaDB/PHP shell sctript which is:
#!/bin/sh
clear
read -p "This script installs Apache, Mariadb, PHP, and Zoneminder 1.30.4 on Ubuntu 18.04 AMD64
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 install Apache, Mariadb Server and PHP
Press Enter to continue or Ctrl + c to quit" nothing
apt update
apt -y install apache2 mariadb-server mariadb-client php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl
clear
read -p "Next secure mariadb server by entering requested information. Press enter to continue" nothing
mysql_secure_installation
wget --no-check-certificate https://173.163.189.225/zoneminder-1.30 ... -amd64.deb -P /tmp/
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini
apt-get -y install /tmp/zoneminder-1.30.4-bionic-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
Specifically, its the "apt-get -y install /tmp/zoneminder-1.30.4-bionic-amd64.deb" command that fails, with the following bailout messaging:
Do you want to continue? [Y/n] Y
Setting up zoneminder (1.30.4-bionic) ...
ERROR 1044 (42000) at line 1: Access denied for user 'debian-sys-maint'@'localhost' to database 'zm'
dpkg: error processing package zoneminder (--configure):
installed zoneminder package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
zoneminder
E: Sub-process /usr/bin/dpkg returned an error code (1)
The only modifications I made to the system to get the rest of the install to work was (in order):
1.) adding the mariadb repo per their website so that maria 10.3 would install
2.) adding "multiverse, restricted, and universe" to my sources.list to get all the libav and some PHP packages to install

Is it all borked because I went out and got MariaDB from the maria website/repo instead of the ubuntu repos?
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Fresh 18.04 LTS Server puking on ZM install

Post by bbunge »

Yup, if you have LAMP installed with Mariadb do a manual install.

Or use:

#!/bin/sh
clear
read -p "This script installs Zoneminder 1.30.4 on Ubuntu 18.04 AMD64
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
wget --no-check-certificate https://173.163.189.225/zoneminder-1.30 ... -amd64.deb -P /tmp/
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini
apt-get -y install /tmp/zoneminder-1.30.4-bionic-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
myurkoski
Posts: 19
Joined: Fri Aug 05, 2016 6:27 pm

Re: Fresh 18.04 LTS Server puking on ZM install

Post by myurkoski »

I did not install LAMP previously, instead hoping to allow the script in the first post to install it's needed subcomponents under the "apt -y install ...." command. Based on where I am right now, should I:
  • install lamp?
  • uninstall the MariaDB that I'd originally grabbed from their extra repo, rip out that repo, and install the Ubuntu-sourced Maria?
  • manually modify a config file somewhere to rectify the current install
I guess that I just don't have a decent understanding of whats actually broken right now, even after googling that error message. This is due to the fact that databases are not an area I understand well. I would prefer to use Maria or MySQL, based on consensus of people much smarter than me. However, if that's more trouble than its worth, I can revert to MySQL. I apologize for my ignorance!
myurkoski
Posts: 19
Joined: Fri Aug 05, 2016 6:27 pm

Re: Fresh 18.04 LTS Server puking on ZM install

Post by myurkoski »

Just an update, I figured since I broke everything so badly already, no harm in trying just about anything. I opted for #2 above (uninstall maria and reinstall from ubuntu source) and managed to get it all running. I just wish I knew what was wrong previously, so I could plop it into the wiki for others to avoid when they install on top of a fresh 18.04 LTS server.

The reason I went to the mariadb website and installed from their repo was because mariaDB would not install(no package match etc.). I later saw a random suggestion to add "multiverse, restricted, and universe" to the sources. Is this a zoneminder condoned practice? I couldn't get it to work without it.
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Fresh 18.04 LTS Server puking on ZM install

Post by bbunge »

myurkoski wrote: Sun Sep 30, 2018 8:26 pm Just an update, I figured since I broke everything so badly already, no harm in trying just about anything. I opted for #2 above (uninstall maria and reinstall from ubuntu source) and managed to get it all running. I just wish I knew what was wrong previously, so I could plop it into the wiki for others to avoid when they install on top of a fresh 18.04 LTS server.

The reason I went to the mariadb website and installed from their repo was because mariaDB would not install(no package match etc.). I later saw a random suggestion to add "multiverse, restricted, and universe" to the sources. Is this a zoneminder condoned practice? I couldn't get it to work without it.
there are plenty of tutorials on the web to install just about anything. LAMP can be installed with tasksel and you get MySQL. You can then install Mariadb and MySQL will be uninstalled. Or you can install LAMP with the individual components like my script does. I learned how to do all these things from the web. GOOGLE IS YOUR FRIEND! Actually i do not retain much. Old guys are like that. Google is my memory. Even notes I have kept get lost or deleted...
myurkoski
Posts: 19
Joined: Fri Aug 05, 2016 6:27 pm

Re: Fresh 18.04 LTS Server puking on ZM install

Post by myurkoski »

Sorry bbunge, I was not clear. The scripts absolutely did not work on a fresh 18.04 LTS install until I added the "multiverse, restricted, universe" sources. There's no mention of this on the wiki page listing all the scripts, so I wanted to know if that's considered safe/standard practice for installing zoneminder. if it IS considered normal, I will update the wiki to put a plug in there about it on the scripts page.
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Fresh 18.04 LTS Server puking on ZM install

Post by bbunge »

Do not bother with the wiki for 1.30.4. The sources are no longer available and the wiki for them will be repurposed for a newer version.
Locked