Fresh install problem on Ubuntu 22.04.3 LTS

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
bloxxom
Posts: 6
Joined: Fri Nov 17, 2023 5:33 am

Fresh install problem on Ubuntu 22.04.3 LTS

Post by bloxxom »

I just installed Ubuntu server (Jammy) on my machine. I then installed Zoneminder, following these instructions:

https://zoneminder.readthedocs.io/en/la ... buntu.html.


Everything went fine, with no problems until the last step which is the one that starts Zoneminder.

It dumped the following systemd log message:

$ systemctl status zoneminder.service
× zoneminder.service - ZoneMinder CCTV recording and surveillance system
Loaded: loaded (/lib/systemd/system/zoneminder.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2023-11-16 21:23:53 PST; 38s ago
Docs: http://zoneminder.readthedocs.org/en/latest/
Process: 29985 ExecStart=/usr/bin/zmpkg.pl start (code=exited, status=255/EXCEPTION)
CPU: 88ms

Nov 16 21:23:53 rahula zmpkg[29985]: ERR [Error reconnecting to db: errstr:Access denied for user 'www-data'@'localhost' (using password: NO) error val:]
Nov 16 21:23:53 rahula zmpkg.pl[29985]: Unable to connect to DB. ZM Cannot continue.

So I'm guessing that something went wrong with the DB setup, but I'm a bit rusty on mysql etc. I'm hoping this is obvious to someone. I've seen other instructions that include steps for creating a DB user, but the instructions I followed didn't ask me to do that, so I didn't. This is the Zoneminder from the Ubuntu Repo, which claims to be version 1.36.12+dfsg1-1
bloxxom
Posts: 6
Joined: Fri Nov 17, 2023 5:33 am

Re: Fresh install problem on Ubuntu 22.04.3 LTS

Post by bloxxom »

Okay, I seem to have gotten it working.

There were a few steps missing from the instructions that I followed.

I had to add the www-data user
I had to create zmuser in mysql
I had to create the zm database

At this point, I was getting a blank page (error 500)

I ran zmupdate.pl -f

Now I can see the web page and it seems to be working. I will add some monitors and see what happens.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Fresh install problem on Ubuntu 22.04.3 LTS

Post by bbunge »

dad1
Posts: 12
Joined: Fri Feb 04, 2011 10:18 am

Re: Fresh install problem on Ubuntu 22.04.3 LTS

Post by dad1 »

Hi,

Rebuilding a new zoneminder server after my last one died from hardware failure. Quick question not covered in the above helpful instrctions - does zoneminder still require its own separate disc partition?

If so does anyone have a custom partition layout for a clean ubuntu install?

Best
dougmccrary
Posts: 1215
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: Fresh install problem on Ubuntu 22.04.3 LTS

Post by dougmccrary »

I find it's better to have a separate disk for recordings. Do you have one? Also, best to have the os and data (i.e., everything other than recordings) on SSD.

Anyway, whatever you have to start, you don't need a partition, the recordings go to /var/cache/zoneminder/
If you have a separate disk available, you can just mount the disk over that and off you go, as long as you set the permissions to www-data.
Post Reply