Difference between revisions of "Ubuntu Server or Desktop Zoneminder 1.36.x"

From ZoneMinder Wiki
Jump to navigationJump to search
(Need to be specific about proposed releases as they can cause problems!)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Ubuntu|<Home]]
==Install Zoneminder 1.36.x on Ubuntu 22.04, 20.04 and 18.04 with shell script==


I have tested Zoneminder under the Ubuntu 12.04 and 13.04 64-bit versions. My reason for doing this was to be able to install a remote control package, such as Teamviewer, to access the PC behind firewalls where I was unable to set up dynamic DNS or port forwarding. I was able to connect to the PC, open Firefox and work with all functions of Zoneminder including viewing events.
This will install Zoneminder 1.36.x by using a shell script with one basic command (how easy is that!).


Install Zoneminder from the desktop CD or DVD or a USB thumbdrive (see http://www.pendrivelinux.com/)
You will need a Ubuntu 22.04, 20.04 or 18.04 install with LAMP (Apache, MySQL or Mariadb and PHP) installed desktop or server.


Open the terminal
'''Note: as of 31OCT22 Ubuntu 22.10 has unmet dependencies and will not install ZM 1.36.31. This  will be fixed in the final release of 1.36.32. As of this edit, 07NOV22, there is a pre-release of 1.36..32 in the proposed PPA but you should use a proposed release for testing only!'''


become root
Timezone: it is recommended you set your specific timesone with:
sudo timedatectl set-timezone America/New_York
Of course use your timezone in place of America/New_York.


sudo su


install tasksel
Google is your friend if you need instructions for setting up a LAMP server. However, a simple LAMP can be installed with these commands:


  apt-get install tasksel
  apt install apache2 php mariadb-server php-mysql libapache2-mod-php


Start tasksel
Secure MySQL or Mariadb, create root password et. al.


  tasksel
  mysql_secure_installation


Check the option to install LAMP
Mariadb additional settings
The default values for the database are adequate for initial setup. However, I recommend you make these changes before installing Zoneminder.
Note: If you have sufficient memory double the values below.
Edit the Mariadb config file:
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Add the following in the [mysql] area:
innodb_file_per_table = ON
innodb_buffer_pool_size = 256M
innodb_log_file_size = 32M
CTRL+o then [Enter] to save


Follow the instructions at:
CTRL+x to exit


[[Ubuntu Server 12.04 64-bit with Zoneminder 1.25.0 the easy way]]
Reatart Mariadb:
sudo service mysql restart


Start at Install Zoneminder
I recommend you install mysqltuner and run it from time to time and adjust the database settings as the number of saved events grows.


or


[[Ubuntu Server 12.04 64-bit with Zoneminder 1.26.5 the easy way]]


Start at: Install PPA Repository for Zoneminder
Shell script file contents:


When Zoneminder is installed, open Firefox and enter: http://localhost/zm  
#!/bin/sh
to configure Zoneminder.
clear
read -p "This script installs ZoneMinder 1.36.x on Ubuntu 22.04, 20.04 or 18.04 with LAMP (MySQL or Mariadb) installed...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will add the PPA repository, install and configure the system to run Zoneminder.
Press enter to continue" nothing
apt install -y software-properties-common
clear
add-apt-repository ppa:iconnor/zoneminder-1.36
apt update
clear
apt install -y zoneminder
systemctl enable zoneminder
service zoneminder start
adduser www-data video
a2enconf zoneminder
a2enmod rewrite
a2enmod headers
a2enmod expires
service apache2 reload
  clear
read -p "Install complete. Open Zoneminder/Options and set the timezone. Press enter to continue" nothing
clear


Install the remote control package of your choice to access your PC from the internet.
Copy the contents of the script, open a terminal and run:
 
nano zm-install
 
Paste the contents of the script into Nano
 
Then:
 
Ctrl + o
Ctrl + x
 
Next run:
 
chmod 755 zm-install
 
Start the script by entering:
 
./zm-install
 
Follow the prompts. Things are pretty simple. The timezone is now set in Zoneminder/Options.
 
Good Luck!

Latest revision as of 08:47, 7 November 2022

Install Zoneminder 1.36.x on Ubuntu 22.04, 20.04 and 18.04 with shell script

This will install Zoneminder 1.36.x by using a shell script with one basic command (how easy is that!).

You will need a Ubuntu 22.04, 20.04 or 18.04 install with LAMP (Apache, MySQL or Mariadb and PHP) installed desktop or server.

Note: as of 31OCT22 Ubuntu 22.10 has unmet dependencies and will not install ZM 1.36.31. This will be fixed in the final release of 1.36.32. As of this edit, 07NOV22, there is a pre-release of 1.36..32 in the proposed PPA but you should use a proposed release for testing only!

Timezone: it is recommended you set your specific timesone with:

sudo timedatectl set-timezone America/New_York

Of course use your timezone in place of America/New_York.


Google is your friend if you need instructions for setting up a LAMP server. However, a simple LAMP can be installed with these commands:

apt install apache2 php mariadb-server php-mysql libapache2-mod-php

Secure MySQL or Mariadb, create root password et. al.

mysql_secure_installation

Mariadb additional settings The default values for the database are adequate for initial setup. However, I recommend you make these changes before installing Zoneminder. Note: If you have sufficient memory double the values below. Edit the Mariadb config file:

sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Add the following in the [mysql] area:

innodb_file_per_table = ON
innodb_buffer_pool_size = 256M
innodb_log_file_size = 32M

CTRL+o then [Enter] to save

CTRL+x to exit

Reatart Mariadb:

sudo service mysql restart

I recommend you install mysqltuner and run it from time to time and adjust the database settings as the number of saved events grows.


Shell script file contents:

#!/bin/sh
clear
read -p "This script installs ZoneMinder 1.36.x on Ubuntu 22.04, 20.04 or 18.04 with LAMP (MySQL or Mariadb) installed...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will add the PPA repository, install and configure the system to run Zoneminder. 
Press enter to continue" nothing
apt install -y software-properties-common
clear
add-apt-repository ppa:iconnor/zoneminder-1.36
apt update
clear
apt install -y zoneminder
systemctl enable zoneminder
service zoneminder start
adduser www-data video
a2enconf zoneminder
a2enmod rewrite
a2enmod headers
a2enmod expires
service apache2 reload
clear
read -p "Install complete. Open Zoneminder/Options and set the timezone. Press enter to continue" nothing
clear

Copy the contents of the script, open a terminal and run:

nano zm-install

Paste the contents of the script into Nano

Then:

Ctrl + o Ctrl + x

Next run:

chmod 755 zm-install

Start the script by entering:

./zm-install

Follow the prompts. Things are pretty simple. The timezone is now set in Zoneminder/Options.

Good Luck!