Zoneminder 1.30.4 made it into the "official" Ubuntu 18.10 repositories. You will need to install LAMP then secure MySQL before installing Zoneminder. I use a very minimum install from the 18.10 mini.iso.

Here are the basic commands you will need. As always start from a root (sudo su) prompt.

mysql_secure_installation

nano /etc/mysql/my.cnf

[mysqld]
sql_mode = NO_ENGINE_SUBSTITUTION

apt install zoneminder

mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql

mysql -uroot -p -e "grant all on zm.* to 'zmuser'@localhost identified by 'zmpass';"