Difference between revisions of "Ubuntu Server or Desktop Zoneminder 1.34.x"
From ZoneMinder Wiki
Jump to navigationJump to search
Line 51: | Line 51: | ||
===Script for Ubuntu 18.04 - will install Apache, Mariadb, PHP and Zoneminder 1.30.4=== | ===Script for Ubuntu 18.04 - will install Apache, Mariadb, PHP and Zoneminder 1.30.4=== | ||
#!/bin/sh | #!/bin/sh | ||
clear | clear | ||
read -p "This script installs Apache, Mariadb, PHP, and Zoneminder 1.30.4 on Ubuntu 18.04 AMD64 | read -p "This script installs Apache, Mariadb, PHP, and Zoneminder 1.30.4 on Ubuntu 18.04 AMD64 | ||
Press Enter to continue or Ctrl + c to quit" nothing | Press Enter to continue or Ctrl + c to quit" nothing | ||
clear | clear | ||
read -p "You must be logged in as root using sudo su ... | read -p "You must be logged in as root using sudo su ... | ||
Press Enter to continue or Ctrl + c to quit" nothing | Press Enter to continue or Ctrl + c to quit" nothing | ||
clear | clear | ||
read -p "Next we will install Apache, Mariadb Server and PHP | read -p "Next we will install Apache, Mariadb Server and PHP | ||
Press Enter to continue or Ctrl + c to quit" nothing | Press Enter to continue or Ctrl + c to quit" nothing | ||
apt update | apt update | ||
apt -y install apache2 mariadb-server mariadb-client php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl | apt -y install apache2 mariadb-server mariadb-client php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl | ||
clear | clear | ||
read -p "Next secure mariadb server by entering requested information. Press enter to continue" nothing | read -p "Next secure mariadb server by entering requested information. Press enter to continue" nothing | ||
mysql_secure_installation | mysql_secure_installation | ||
read -p "Next we will download the Zoneminder install package. This may take a minute to connect | read -p "Next we will download the Zoneminder install package. This may take a minute to connect | ||
Press enter to continue" nothing | 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 | 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* | ls /tmp/zoneminder* | ||
read -p "Check above to be sure the file downloaded. Should be: | read -p "Check above to be sure the file downloaded. Should be: | ||
/tmp/zoneminder-1.30.4-bionic-amd64.deb (5686708) | /tmp/zoneminder-1.30.4-bionic-amd64.deb (5686708) | ||
Press Enter to continue or Ctrl + c to quit" nothing | Press Enter to continue or Ctrl + c to quit" nothing | ||
clear | clear | ||
read -p "Next we will add time zone to PHP config files. | read -p "Next we will add time zone to PHP config files. | ||
Press enter to continue" nothing | Press enter to continue" nothing | ||
awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini | awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini | ||
clear | clear | ||
read -p "Now we will install, enable and start Zoneminder. | read -p "Now we will install, enable and start Zoneminder. | ||
Press enter to continue" nothing | Press enter to continue" nothing | ||
apt-get -y install /tmp/zoneminder-1.30.4-bionic-amd64.deb | apt-get -y install /tmp/zoneminder-1.30.4-bionic-amd64.deb | ||
systemctl enable zoneminder | systemctl enable zoneminder | ||
service zoneminder start | service zoneminder start | ||
read -p "Now we will add settings to Apache and restart it. | read -p "Now we will add settings to Apache and restart it. | ||
Press enter to continue" nothing | Press enter to continue" nothing | ||
adduser www-data video | adduser www-data video | ||
a2enmod cgi | a2enmod cgi | ||
a2enconf zoneminder | a2enconf zoneminder | ||
a2enmod rewrite | a2enmod rewrite | ||
chown -R www-data:www-data /usr/share/zoneminder/ | chown -R www-data:www-data /usr/share/zoneminder/ | ||
service apache2 reload | service apache2 reload | ||
clear | clear | ||
read -p "Open Zoneminder in a web browser (http://server-ip/zm). | 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 on Options - Paths and change PATH_ZMS to /zm/cgi-bin/nph-zms | ||
Click the Save button. | Click the Save button. | ||
Press enter to continue" nothing | Press enter to continue" nothing | ||
clear | clear |
Revision as of 18:52, 1 April 2018
Shell script zm-install-bionic
Sript for Ubuntu with LAMP (MySQL)
#!/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. This may take a minute to connect 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 (5686708) 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
Script for Ubuntu 18.04 - will install Apache, Mariadb, PHP and Zoneminder 1.30.4
#!/bin/sh clear read -p "This script installs Apache, Mariadb, PHP, and Zoneminder 1.30.4 on Ubuntu 18.04 AMD64 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 install Apache, Mariadb Server and PHP Press Enter to continue or Ctrl + c to quit" nothing apt update apt -y install apache2 mariadb-server mariadb-client php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2-zip php7.2-curl clear read -p "Next secure mariadb server by entering requested information. Press enter to continue" nothing mysql_secure_installation read -p "Next we will download the Zoneminder install package. This may take a minute to connect 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 (5686708) Press Enter to continue or Ctrl + c to quit" nothing clear read -p "Next we will add time zone to PHP config files. Press enter to continue" nothing awk '$0="date.timezone = "$0' /etc/timezone >> /etc/php/7.2/apache2/php.ini 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