Difference between revisions of "Ubuntu Server or Desktop Zoneminder 1.34.x"
(Replaced content with "Shell script zm-install-bionic") |
|||
Line 1: | Line 1: | ||
Shell script zm-install-bionic | Shell script zm-install-bionic | ||
#!/bin/sh | |||
clear | |||
read -p "This script installs Zoneminder 1.30.4 on Ubuntu 18.04 AMD64 with LAMP (MySQL) installed... | |||
Press Enter to continue or Ctrl + c to quit" nothing | |||
clear | |||
read -p "You must be logged in as root using sudo su ... | |||
Press Enter to continue or Ctrl + c to quit" nothing | |||
clear | |||
read -p "Next we will download the Zoneminder install package. | |||
Press enter to continue" nothing | |||
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX' -O /tmp/zoneminder-1.30.4-bionic-amd64.deb | |||
ls /tmp/zoneminder* | |||
read -p "Check above to be sure the file downloaded. Should be: | |||
/tmp/zoneminder-1.30.4-bionic-amd64.deb (5554 KB) | |||
Press Enter to continue or Ctrl + c to quit" nothing | |||
clear | |||
read -p "Next we will add settings to MySQL and PHP config files. | |||
Press enter to continue" nothing | |||
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini | |||
echo "[mysqld]" >> /etc/mysql/my.cnf | |||
echo "init_connect = 'SET @@sql_mode = CASE CURRENT_USER() WHEN \'zmuser@localhost\' THEN \'NO_ENGINE_SUBSTITUTION\' ELSE @@sql_mode END;'" >> /etc/mysql/my.cnf | |||
systemctl restart mysql | |||
clear | |||
read -p "Now we will install, enable and start Zoneminder. | |||
Press enter to continue" nothing | |||
apt-get -y install /tmp/zoneminder-1.30.4-bionic-amd64.deb | |||
systemctl enable zoneminder | |||
service zoneminder start | |||
read -p "Now we will add settings to Apache and restart it. | |||
Press enter to continue" nothing | |||
adduser www-data video | |||
a2enmod cgi | |||
a2enconf zoneminder | |||
a2enmod rewrite | |||
chown -R www-data:www-data /usr/share/zoneminder/ | |||
service apache2 reload | |||
clear | |||
read -p "Open Zoneminder in a web browser (http://server-ip/zm). | |||
Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms | |||
Click the Save button. | |||
Press enter to continue" nothing | |||
clear |
Revision as of 15:24, 29 March 2018
Shell script zm-install-bionic
- !/bin/sh
clear read -p "This script installs Zoneminder 1.30.4 on Ubuntu 18.04 AMD64 with LAMP (MySQL) installed...
Press Enter to continue or Ctrl + c to quit" nothing clear
read -p "You must be logged in as root using sudo su ...
Press Enter to continue or Ctrl + c to quit" nothing
clear
read -p "Next we will download the Zoneminder install package.
Press enter to continue" nothing
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1bZhVcBnlW46SwCnSnZ0sdZzwtOcCiisX' -O /tmp/zoneminder-1.30.4-bionic-amd64.deb ls /tmp/zoneminder* read -p "Check above to be sure the file downloaded. Should be: /tmp/zoneminder-1.30.4-bionic-amd64.deb (5554 KB)
Press Enter to continue or Ctrl + c to quit" nothing clear read -p "Next we will add settings to MySQL and PHP config files.
Press enter to continue" nothing
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini
echo "[mysqld]" >> /etc/mysql/my.cnf
echo "init_connect = 'SET @@sql_mode = CASE CURRENT_USER() WHEN \'zmuser@localhost\' THEN \'NO_ENGINE_SUBSTITUTION\' ELSE @@sql_mode END;'" >> /etc/mysql/my.cnf
systemctl restart mysql
clear read -p "Now we will install, enable and start Zoneminder.
Press enter to continue" nothing
apt-get -y install /tmp/zoneminder-1.30.4-bionic-amd64.deb
systemctl enable zoneminder
service zoneminder start
read -p "Now we will add settings to Apache and restart it.
Press enter to continue" nothing
adduser www-data video
a2enmod cgi
a2enconf zoneminder
a2enmod rewrite
chown -R www-data:www-data /usr/share/zoneminder/
service apache2 reload
clear
read -p "Open Zoneminder in a web browser (http://server-ip/zm). Click on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms Click the Save button.
Press enter to continue" nothing clear