Installing 1.36 On Ubuntu 22.04

Discussions related to the 1.36.x series of ZoneMinder
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

Hello All,

I was running a Windows server and had Blue Iris on it. I recently upgraded the server and installed Ubuntu 22.04. I am not a coder and my knowledge of Linux is mostly cut and paste.
I followed these directions https://www.how2shout.com/linux/how-to- ... 20-04-lts/ and can't get the Apache server to start. Is anyone here good at installing ZoneMinder with the terminal?

TIA

Hobs

Code: Select all

× apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2023-01-27 10:53:13 EST; 3min 31s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 63174 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
        CPU: 15ms

Jan 27 10:53:13 Home-Server systemd[1]: Starting The Apache HTTP Server...
Jan 27 10:53:13 Home-Server apachectl[63177]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 27 10:53:13 Home-Server apachectl[63177]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 27 10:53:13 Home-Server apachectl[63177]: no listening sockets available, shutting down
Jan 27 10:53:13 Home-Server apachectl[63177]: AH00015: Unable to open logs
Jan 27 10:53:13 Home-Server apachectl[63174]: Action 'start' failed.
Jan 27 10:53:13 Home-Server apachectl[63174]: The Apache error log may have more information.
Jan 27 10:53:13 Home-Server systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jan 27 10:53:13 Home-Server systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 27 10:53:13 Home-Server systemd[1]: Failed to start The Apache HTTP Server.

● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-01-26 18:13:54 EST; 16h ago
   Main PID: 15622 (mysqld)
     Status: "Server is operational"
      Tasks: 46 (limit: 76972)
     Memory: 403.8M
        CPU: 9min 56.377s
     CGroup: /system.slice/mysql.service
             └─15622 /usr/sbin/mysqld

PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

Here is the problem

Code: Select all

root@Home-Server:~# systemctl reload apache2
apache2.service is not active, cannot reload.
root@Home-Server:~# 
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

I found a syntax error and tried to replace the config files. I still can't get it to start.

Code: Select all

root@Home-Server:/etc/apache2# apache2 --help
[Fri Jan 27 11:16:13.479952 2023] [core:warn] [pid 66199] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
root@Home-Server:/etc/apache2# sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libflashrom1 libftdi1-2 libgstreamer-plugins-bad1.0-0 libva-wayland2
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 7 not upgraded.
Need to get 97.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 apache2 amd64 2.4.52-1ubuntu4.2 [97.9 kB]
Fetched 97.9 kB in 0s (357 kB/s) 
(Reading database ... 221509 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.52-1ubuntu4.2_amd64.deb ...
Unpacking apache2 (2.4.52-1ubuntu4.2) over (2.4.52-1ubuntu4.2) ...
Setting up apache2 (2.4.52-1ubuntu4.2) ...
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for ufw (0.36.1-4build1) ...
root@Home-Server:/etc/apache2# systemctl reload apache2
apache2.service is not active, cannot reload.
root@Home-Server:/etc/apache2# 
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

I tried to completely delete apache2 and reinstall it. No luck?

I'm banging my head here. Any Ideas?

Code: Select all

root@Home-Server:/etc/apache2# sudo apt-get purge apache2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apache2-data chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libflashrom1 libftdi1-2 libgstreamer-plugins-bad1.0-0
  libva-wayland2
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  apache2*
0 upgraded, 0 newly installed, 1 to remove and 7 not upgraded.
After this operation, 546 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 221509 files and directories currently installed.)
Removing apache2 (2.4.52-1ubuntu4.2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for ufw (0.36.1-4build1) ...
(Reading database ... 221460 files and directories currently installed.)
Purging configuration files for apache2 (2.4.52-1ubuntu4.2) ...
Processing triggers for ufw (0.36.1-4build1) ...
root@Home-Server:/etc/apache2# sudo apt-get install apache2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libflashrom1 libftdi1-2 libgstreamer-plugins-bad1.0-0 libva-wayland2
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser
The following NEW packages will be installed:
  apache2
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 0 B/97.9 kB of archives.
After this operation, 546 kB of additional disk space will be used.
Selecting previously unselected package apache2.
(Reading database ... 221297 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.52-1ubuntu4.2_amd64.deb ...
Unpacking apache2 (2.4.52-1ubuntu4.2) ...
Setting up apache2 (2.4.52-1ubuntu4.2) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling module reqtimeout.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Created symlink /etc/systemd/system/multi-user.target.wants/apache2.service → /lib/systemd/system/apache2.service.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
Created symlink /etc/systemd/system/multi-user.target.wants/apache-htcacheclean.service → /lib/systemd/system/apache-htcacheclean.service.
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for ufw (0.36.1-4build1) ...
root@Home-Server:/etc/apache2# systemctl reload apache2
apache2.service is not active, cannot reload.
root@Home-Server:/etc/apache2# 
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Installing 1.36 On Ubuntu 22.04

Post by Magic919 »

Have you done this?

Code: Select all

sudo systemctl enable --now apache2
-
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

Magic919 wrote: Fri Jan 27, 2023 5:10 pm Have you done this?

Code: Select all

sudo systemctl enable --now apache2
I did now. see the results below... Same

Code: Select all

pilothobs@Home-Server:~$ sudo systemctl enable --now apache2
[sudo] password for pilothobs: 
Synchronizing state of apache2.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details.
pilothobs@Home-Server:~$ systemctl restart mysql
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to restart 'mysql.service'.
Authenticating as: Hobson Black,,, (pilothobs)
Password: 
==== AUTHENTICATION COMPLETE ===
pilothobs@Home-Server:~$ systemctl reload apache2
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to reload 'apache2.service'.
Authenticating as: Hobson Black,,, (pilothobs)
Password: 
==== AUTHENTICATION COMPLETE ===
apache2.service is not active, cannot reload.
pilothobs@Home-Server:~$ 
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Installing 1.36 On Ubuntu 22.04

Post by Magic919 »

Try the suggested commands and look for the errors.
-
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by pat2 »

See "systemctl status apache2.service" and "journalctl -xeu apache2.service"

In a previous post I read

H00111: Config variable ${APACHE_RUN_DIR} is not defined
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

Magic919 wrote: Fri Jan 27, 2023 6:50 pm Try the suggested commands and look for the errors.
Hmmmm..

Thant is what I am trying to fix.
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

pat2 wrote: Fri Jan 27, 2023 7:21 pm See "systemctl status apache2.service" and "journalctl -xeu apache2.service"

In a previous post I read

H00111: Config variable ${APACHE_RUN_DIR} is not defined
OKAY.

So How do I fix it?
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Installing 1.36 On Ubuntu 22.04

Post by Magic919 »

I’ll leave you to it.
-
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

Magic919 wrote: Sat Jan 28, 2023 3:45 pm I’ll leave you to it.

Boy. That was helpful.
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

How do I fix this?

Code: Select all

Jan 28 12:58:08 Home-Server systemd[1]: Starting The Apache HTTP Server...
Jan 28 12:58:08 Home-Server apachectl[137404]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Jan 28 12:58:08 Home-Server apachectl[137404]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Jan 28 12:58:08 Home-Server apachectl[137404]: no listening sockets available, shutting down
Jan 28 12:58:08 Home-Server apachectl[137404]: AH00015: Unable to open logs
Jan 28 12:58:08 Home-Server apachectl[137401]: Action 'start' failed.
Jan 28 12:58:08 Home-Server apachectl[137401]: The Apache error log may have more information.
Jan 28 12:58:08 Home-Server systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Jan 28 12:58:08 Home-Server systemd[1]: apache2.service: Failed with result 'exit-code'.
Jan 28 12:58:08 Home-Server systemd[1]: Failed to start The Apache HTTP Server.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by pat2 »

Hi Hobs,

this is Zoneminder, not the basic course of Ubuntu.
Please, don't give up, but probably you have to come back to Win/BlueIris.
Anyway, let's give it a try, I will give you directions.

- clear your disk and reinstall Ubuntu 22.04 then

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo sudo apt autoremove
sudo reboot

sudo dpkg-reconfigure tzdata (optional)
===============================================================================================
sudo apt install apache2
sudo nano /etc/apache2/apache2.conf (optional)
insert ServerName 127.0.0.1 (optional)
sudo apache2ctl configtest (pls take note of the answer)
sudo systemctl restart apache2

open the web browser (Firefox is recommended) and check http://LAN_ip_of_your_server, please post the printscreen of the web page
===============================================================================================
sudo apt install mysql-server
===============================================================================================
sudo apt install php libapache2-mod-php php-mysql
sudo nano /etc/php/8.1/apache2/php.ini (optional)
insert date.timezone = America/New_York (or whatever is your timezone) (optional)
===============================================================================================
sudo -i
add-apt-repository ppa:iconnor/zoneminder-1.36
apt-get update
apt-get upgrade

apt-get install zoneminder

chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
chown -R www-data:www-data /usr/share/zoneminder/
a2enmod cgi
a2enmod rewrite
a2enconf zoneminder
a2enmod expires
a2enmod headers
systemctl enable zoneminder
systemctl start zoneminder

open the web browser (Firefox is recommended) and check http://LAN_ip_of_your_server/zm, please post the printscreen of the web page
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Installing 1.36 On Ubuntu 22.04

Post by bbunge »

The instructions you followed initially are incomplete and confusing.

The easy way to install Zoneminder is found on the WIKI here: https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x

I have run the install script many times and it just works! My recommendation is to use Mariadb instead of MySQL. It is easy to start over with a fresh install of Ubuntu Server (you do not need a Ubuntu desktop).

Trying to fix what you have is a waste of time. Just start over. With my 100/100 fiber I can have Ubuntu or Debian up and running Zoneminder in less than 1/2 hour from a bare hard drive.
Post Reply