Installing 1.36 On Ubuntu 22.04

Discussions related to the 1.36.x series of ZoneMinder
User avatar
iconnor
Posts: 2879
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Installing 1.36 On Ubuntu 22.04

Post by iconnor »

https://youtu.be/hUqMUhgytyc

Some instructions for 22.04.
PilotHobs
Posts: 11
Joined: Fri Jan 27, 2023 2:34 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by PilotHobs »

Hi pat2

I followed you instructions and still have the errors. I reinstalled Ubuntu too.
The answers are in bold and underlined
The code for the errors are below too.

Thanks for trying to help me. I understand that this is not a help desk for Linux n00bs.


Hobs





pat2 wrote: Sat Jan 28, 2023 8:28 pm 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)

Syntax OK
sudo systemctl restart 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.


open the web browser (Firefox is recommended) and check http://LAN_ip_of_your_server, please post the printscreen of the web page

Image
===============================================================================================
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


404 File NOT FOUND



Code: Select all

hobs@Ubuntu-Server:~$ sudo systemctl restart 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.

Code: Select all

hobs@Ubuntu-Server:~$ sudo apache2ctl configtest
Syntax OK
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Installing 1.36 On Ubuntu 22.04

Post by dougmccrary »

Try running the script as bbunge suggests: https://wiki.zoneminder.com/Ubuntu_Serv ... der_1.36.x

over what you have. I *think* that will fix it.

If not, follow the whole wiki section from fresh.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by pat2 »

Hi Hobs,

that's the routine I follow for 22.04 on my Odroid board and on a 22.04 virtual machine (on Win) that I occasionally use to make experiments.
And it works.
Currently my production environment is on 16.04, development environment is on 22.04.

Probably missing/mistaken any step in your 22.04 installation or you didn't restart from scratch (did you do?).

The strange it seems the config test is OK and you are able to reach the apache web page (that tells "It works").
But the system doesn't allow you to reload the apache service.

Before trying the instruction by Bunge or Isaac please, as suggested by the system, try to check

Code: Select all

sudo systemctl status apache2.service
and

Code: Select all

sudo journalctl -xeu apache2.service
and let's know please.
It will provide more detail about the error. You have an issue on the Apache web server installation (that is the more easy part! :-) ). Hope it will more clear after you will tell us the details.

Thanks

Note: for your knowledge, currently you are stopped to the first phase of LAMP stack installation (LAMP stack is used by Zoneminder), In particular the installation of Apache, the service that allows the system to publish web pages (Zoneminder uses Apache services)

Please, see the apache installation instructions by DigitalOcean:

https://www.digitalocean.com/community/ ... untu-22-04

except the firewall matter (not important in your case), it's exactly what suggested with check on syntax and Apache web page.

If you try:

sudo nano /var/www/html/index.html

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World, I'm Hobs!</h1>
</body>
</html>

and save, you should be able, since the apache web page is working, to reach your new page at http://LAN_ip_of_your_server/index.html
For such damned reason the system is able to publish the apache web page and probably will be able for the Hello World page, but not able to reload the service..
---------------------------------------------------------------------------
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 »

Hi pat2

I tried the code you suggested and posted the results below.
I also tried to follow the install instructions over on digitalocean and had the same results.

Maybe I should install 18.02


Hobs







pat2 wrote: Mon Jan 30, 2023 9:05 am Hi Hobs,

that's the routine I follow for 22.04 on my Odroid board and on a 22.04 virtual machine (on Win) that I occasionally use to make experiments.
And it works.
Currently my production environment is on 16.04, development environment is on 22.04.

Probably missing/mistaken any step in your 22.04 installation or you didn't restart from scratch (did you do?).

The strange it seems the config test is OK and you are able to reach the apache web page (that tells "It works").
But the system doesn't allow you to reload the apache service.

Before trying the instruction by Bunge or Isaac please, as suggested by the system, try to check

Code: Select all

sudo systemctl status apache2.service

Code: Select all

hobs@Ubuntu-Server:~$ sudo systemctl status apache2.service
[sudo] password for hobs: 
× apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sun 2023-01-29 18:47:08 EST; 15h ago
       Docs: https://httpd.apache.org/docs/2.4/
        CPU: 15ms

Jan 29 18:47:08 Ubuntu-Server apachectl[110268]: (98)Address already in use: AH000>
Jan 29 18:47:08 Ubuntu-Server apachectl[110268]: no listening sockets available, s>
Jan 29 18:47:08 Ubuntu-Server apachectl[110268]: AH00015: Unable to open logs
Jan 29 18:47:08 Ubuntu-Server apachectl[110265]: Action 'start' failed.
Jan 29 18:47:08 Ubuntu-Server apachectl[110265]: The Apache error log may have mor>
Jan 29 18:47:08 Ubuntu-Server systemd[1]: apache2.service: Control process exited,>
Jan 29 18:47:08 Ubuntu-Server systemd[1]: apache2.service: Failed with result 'exi>
Jan 29 18:47:08 Ubuntu-Server systemd[1]: Failed to start The Apache HTTP Server.
Jan 29 22:35:56 Ubuntu-Server systemd[1]: apache2.service: Unit cannot be reloaded>
Jan 29 22:45:50 Ubuntu-Server systemd[1]: apache2.service: Unit cannot be reloaded>
lines 1-16/16 (END)
and

Code: Select all

sudo journalctl -xeu apache2.service

Code: Select all

hobs@Ubuntu-Server:~$ sudo journalctl -xeu apache2.service
Jan 29 18:47:08 Ubuntu-Server apachectl[110268]: (98)Address already in use: AH000>
Jan 29 18:47:08 Ubuntu-Server apachectl[110268]: no listening sockets available, s>
Jan 29 18:47:08 Ubuntu-Server apachectl[110268]: AH00015: Unable to open logs
Jan 29 18:47:08 Ubuntu-Server apachectl[110265]: Action 'start' failed.
Jan 29 18:47:08 Ubuntu-Server apachectl[110265]: The Apache error log may have mor>
Jan 29 18:47:08 Ubuntu-Server systemd[1]: apache2.service: Control process exited,>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ An ExecStart= process belonging to unit apache2.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Jan 29 18:47:08 Ubuntu-Server systemd[1]: apache2.service: Failed with result 'exi>
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ The unit apache2.service has entered the 'failed' state with result 'exit-code'.
Jan 29 18:47:08 Ubuntu-Server systemd[1]: Failed to start The Apache HTTP Server.
░░ Subject: A start job for unit apache2.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ 
░░ A start job for unit apache2.service has finished with a failure.
░░ 
░░ The job identifier is 9241 and the job result is failed.
Jan 29 22:35:56 Ubuntu-Server systemd[1]: apache2.service: Unit cannot be reloaded>
Jan 29 22:45:50 Ubuntu-Server systemd[1]: apache2.service: Unit cannot be reloaded>
lines 120-148/148 (END)
and let's know please.
It will provide more detail about the error. You have an issue on the Apache web server installation (that is the more easy part! :-) ). Hope it will more clear after you will tell us the details.

Thanks

Note: for your knowledge, currently you are stopped to the first phase of LAMP stack installation (LAMP stack is used by Zoneminder), In particular the installation of Apache, the service that allows the system to publish web pages (Zoneminder uses Apache services)

Please, see the apache installation instructions by DigitalOcean:

https://www.digitalocean.com/community/ ... untu-22-04

except the firewall matter (not important in your case), it's exactly what suggested with check on syntax and Apache web page.

If you try:

sudo nano /var/www/html/index.html

Code: Select all

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/>
<html xmlns="http://www.w3.org/1999/xhtml">
  <!--
    Modified from the Debian original for Ubuntu
    Last updated: 2022-03-22
    See: https://launchpad.net/bugs/1966004
  -->
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Apache2 Ubuntu Default Page: It works</title>
    <style type="text/css" media="screen">
  * {
    margin: 0px 0px 0px 0px;
    padding: 0px 0px 0px 0px;
  }

  body, html {
    padding: 3px 3px 3px 3px;

    background-color: #D8DBE2;

    font-family: Ubuntu, Verdana, sans-serif;
    font-size: 11pt;
    text-align: center;
  }

<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World, I'm Hobs!</h1>
</body>
</html>

and save, you should be able, since the apache web page is working, to reach your new page at http://LAN_ip_of_your_server/index.html
For such damned reason the system is able to publish the apache web page and probably will be able for the Hello World page, but not able to reload the service..

The index page is the same as the Apache2 Default page.
pat2
Posts: 156
Joined: Fri Sep 16, 2016 6:35 pm

Re: Installing 1.36 On Ubuntu 22.04

Post by pat2 »

Hi,

really strange error. It seems you are already using ports. Really strange for an installation from scratch.

Let's try with a fresh installation on 20.04. It's my way to be sure you will start from scratch.
And then please execute exactly the instruction by bunge.
Let us know please.
---------------------------------------------------------------------------
ZM 1.36.34 - 14 cameras on Orange Pi 5 (arm64) - Ubuntu Jammy 22.04
Post Reply