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