Difference between revisions of "Ubuntu Server 18.04 64-bit with Zoneminder 1.30.4 the easy way"
Line 124: | Line 124: | ||
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1FobIfWW5qzite5sK-9DPNee8SJOn9a2n' -O zm-install-bionic | wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1FobIfWW5qzite5sK-9DPNee8SJOn9a2n' -O zm-install-bionic | ||
or view the file contents here: | |||
[[Shell script zm-install-bionic]] | |||
Open a terminal and run: | Open a terminal and run: | ||
Revision as of 16:19, 29 March 2018
Ubuntu 18.04 with Zoneminder 1.30.4 Preliminary Install Procedure
Ubuntu 18.04 with LAMP and Zoneminder 1.30.4
Notice: 22MAR18 - Zoneminder has been removed from the Ubuntu 18.04, Bionic, repository. PHP updates to version 7.2 also caused some problems which have been resolved (I hope!). This procedure uses a patched install from Zesty along with cakephp and crud updates to work with PHP7.2
Warning!!! This is a preliminary procedure and changes to the nightly build may cause problems.
Ubuntu 18.04 Bionic Server Nightly Build (22MAR18) installed with LAMP and OpenSSH Server
To better manage the MySQL server I recommend you copy the sample config file and replace the default my.cnf symbolic link.
This removes the current symbolic link
rm /etc/mysql/my.cnf
This moves the MYSQL Configuration file
cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf
To change MySQL settings:
nano /etc/mysql/my.cnf
In the [mysqld] section add the following
sql_mode = NO_ENGINE_SUBSTITUTION
Note: if you are installing on an existing database server you can use the folowing as an alternate (Thanks to "bodom" for this alternate):
init_connect = 'SET @@sql_mode = CASE CURRENT_USER() WHEN \'zmuser@localhost\' THEN \'NO_ENGINE_SUBSTITUTION\' ELSE @@sql_mode END;'
Ctrl+o Enter to save
CTRL+x to exit
Restart MySQL
systemctl restart mysql
Secure MySQL and set root password (Password not set in nightly build). Do not install the password validation plugin as the default Zoneminder password is not strong.
mysql_secure_installation
Dowmload the Zoneminder install package:
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX' -O zoneminder-1.30.4-bionic-amd64.deb
Note: If needed you can get the file from Onedrive https://1drv.ms/u/s!ApMZyp0q7cregdRym0MrU9BeMP_JUQ or Google Drive https://drive.google.com/open?id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX
Install Zoneminder - change (user) to the name you use to login.
apt install /home/(user)/zoneminder-1.30.4-bionic-amd64.deb
Enable Zoneminder service to start at boot
systemctl enable zoneminder.service
Add www-data to the sudo group (to enable use of local video devices)
adduser www-data video
Start Zoneminder
systemctl start zoneminder.service
Enable CGI and Zoneminder configuration in Apache.
a2enmod cgi
a2enmod rewrite
a2enconf zoneminder
Add timezone to PHP
nano /etc/php/7.2/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone. Be sure to remove the ; before date.timezone
[Date]
- Defines the default timezone used by the date functions
- http://php.net/date.timezone
date.timezone = America/New_York
Ctrl+o Enter to save
CTRL+x to exit
Change permissions in /usr/share/zoneminder/
chown -R www-data:www-data /usr/share/zoneminder/
Restart Apache
service apache2 restart
Open Zoneminder in a web browser (http://server-ip/zm).
Install Zoneminder on Ubuntu 18.04 with shell script
Added 27MAR18
This will install Zoneminder by using a shell script with one basic command (how easy is that!)
I have tested this on Ubuntu 18.04 server x64. You have to have LAMP, Apache, MySQL and PHP installed to run this. The script will install everything Zoneminder needs to function and set up Zoneminder!
You will need to download the file from:
https://drive.google.com/file/d/1FobIfWW5qzite5sK-9DPNee8SJOn9a2n/view?usp=sharing
Copy the file, zm_install, to your home directory.
Or download the file with wget:
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1FobIfWW5qzite5sK-9DPNee8SJOn9a2n' -O zm-install-bionic
or view the file contents here:
Shell script zm-install-bionic
Open a terminal and run:
chmod 755 zm-install-bionic
Start the script by entering:
./zm-install-bionic
Follow the prompts. Things are pretty simple. The timezone will be detected from the OS and added to the php.ini. A modification to my.cnf for Zoneminder will also be done.
Good Luck!
While this script worked for me I can't be responsible if you loose data when you run this. It is intended for a new install not an upgrade.