Consistency changes
parent
b2d1d688cc
commit
219289ee20
|
@ -6,7 +6,7 @@ Debian
|
|||
Easy Way: Debian Jessie
|
||||
-----------------------
|
||||
|
||||
**Step 1**: Setup Sudo
|
||||
**Step 1:** Setup Sudo
|
||||
|
||||
By default Debian does not come with sudo. Log in as root or use su command.
|
||||
N.B. The instructions below are for setting up sudo for your current account, you can
|
||||
|
@ -21,7 +21,7 @@ do this as root if you prefer.
|
|||
|
||||
Logout or try ``newgrp`` to reload user groups
|
||||
|
||||
**Step 2**: Run sudo and update
|
||||
**Step 2:** Run sudo and update
|
||||
|
||||
Now run session using sudo and ensure system is updated.
|
||||
::
|
||||
|
@ -29,7 +29,7 @@ Now run session using sudo and ensure system is updated.
|
|||
sudo -i
|
||||
aptitude safe-upgrade
|
||||
|
||||
**Step 3**: Install Apache and MySQL
|
||||
**Step 3:** Install Apache and MySQL
|
||||
|
||||
These are not dependencies for the package as they could
|
||||
be installed elsewhere.
|
||||
|
@ -38,7 +38,7 @@ be installed elsewhere.
|
|||
|
||||
aptitude install apache2 mysql-server
|
||||
|
||||
**Step 4**: Edit sources.list to add jessie-backports
|
||||
**Step 4:** Edit sources.list to add jessie-backports
|
||||
|
||||
::
|
||||
|
||||
|
@ -54,14 +54,14 @@ Add the following to the bottom of the file
|
|||
CTRL+o and <Enter> to save
|
||||
CTRL+x to exit
|
||||
|
||||
**Step 5**: Install ZoneMinder
|
||||
**Step 5:** Install ZoneMinder
|
||||
|
||||
::
|
||||
|
||||
aptitude update
|
||||
aptitude install zoneminder
|
||||
|
||||
**Step 6**: Read the Readme
|
||||
**Step 6:** Read the Readme
|
||||
|
||||
The rest of the install process is covered in the README.Debian, so feel free to have
|
||||
a read.
|
||||
|
@ -71,7 +71,7 @@ a read.
|
|||
gunzip /usr/share/doc/zoneminder/README.Debian.gz
|
||||
cat /usr/share/doc/zoneminder/README.Debian
|
||||
|
||||
**Step 7**: Setup Database
|
||||
**Step 7:** Setup Database
|
||||
|
||||
Install the zm database and setup the user account. Refer to Hints in Ubuntu install
|
||||
should you choose to change default database user and password.
|
||||
|
@ -81,7 +81,7 @@ should you choose to change default database user and password.
|
|||
cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables,alter,create,select,insert,update,delete,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
|
||||
** Step 8**: zm.conf Permissions
|
||||
** Step 8:** zm.conf Permissions
|
||||
|
||||
Adjust permissions to the zm.conf file to allow web account to access it.
|
||||
|
||||
|
@ -89,13 +89,13 @@ Adjust permissions to the zm.conf file to allow web account to access it.
|
|||
|
||||
chgrp -c www-data /etc/zm/zm.conf
|
||||
|
||||
**Step 9**: Setup ZoneMinder service
|
||||
**Step 9:** Setup ZoneMinder service
|
||||
|
||||
::
|
||||
|
||||
systemctl enable zoneminder.service
|
||||
|
||||
**Step 10**: Configure Apache
|
||||
**Step 10:** Configure Apache
|
||||
|
||||
The following commands will setup the default /zm virtual directory and configure
|
||||
required apache modules.
|
||||
|
@ -106,7 +106,7 @@ required apache modules.
|
|||
a2enmod cgi
|
||||
a2enmod rewrite
|
||||
|
||||
**Step 11**: Edit Timezone in PHP
|
||||
**Step 11:** Edit Timezone in PHP
|
||||
|
||||
::
|
||||
|
||||
|
@ -127,16 +127,16 @@ CTRL+o then [Enter] to save
|
|||
|
||||
CTRL+x to exit
|
||||
|
||||
**Step 12**: Start ZoneMinder
|
||||
**Step 12:** Start ZoneMinder
|
||||
|
||||
Reload Apache to enable your changes and then start ZoneMinder.
|
||||
|
||||
::
|
||||
|
||||
service apache2 reload
|
||||
service zoneminder start
|
||||
systemctl reload apache2
|
||||
systemctl start zoneminder
|
||||
|
||||
**Step 13**: Making sure ZoneMinder works
|
||||
**Step 13:** Making sure ZoneMinder works
|
||||
|
||||
1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ achieve the same result by running:
|
|||
|
||||
During installation it will ask you to set up a master/root password for the MySQL.
|
||||
|
||||
**Step 1**: Either run commands in this install using sudo or use the below to become root
|
||||
**Step 1:** Either run commands in this install using sudo or use the below to become root
|
||||
::
|
||||
|
||||
sudo -i
|
||||
|
||||
**Step 2**: Update Repos
|
||||
**Step 2:** Update Repos
|
||||
|
||||
.. topic :: Latest Release
|
||||
|
||||
|
@ -44,7 +44,7 @@ Update repo and upgrade.
|
|||
apt-get upgrade
|
||||
apt-get dist-upgrade
|
||||
|
||||
**Step 3**: Configure MySQL
|
||||
**Step 3:** Configure MySQL
|
||||
|
||||
.. sidebar :: Note
|
||||
|
||||
|
@ -89,13 +89,13 @@ Restart MySQL
|
|||
systemctl restart mysql
|
||||
|
||||
|
||||
**Step 4**: Install ZoneMinder
|
||||
**Step 4:** Install ZoneMinder
|
||||
|
||||
::
|
||||
|
||||
apt-get install zoneminder
|
||||
|
||||
**Step 5**: Configure the ZoneMinder Database
|
||||
**Step 5:** Configure the ZoneMinder Database
|
||||
|
||||
::
|
||||
|
||||
|
@ -103,7 +103,7 @@ Restart MySQL
|
|||
mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"
|
||||
|
||||
|
||||
**Step 6**: Set permissions
|
||||
**Step 6:** Set permissions
|
||||
|
||||
Set /etc/zm/zm.conf to root:www-data 740 and www-data access to content
|
||||
|
||||
|
@ -113,7 +113,7 @@ Set /etc/zm/zm.conf to root:www-data 740 and www-data access to content
|
|||
chown root:www-data /etc/zm/zm.conf
|
||||
chown -R www-data:www-data /usr/share/zoneminder/
|
||||
|
||||
**Step 7**: Configure Apache correctly:
|
||||
**Step 7:** Configure Apache correctly:
|
||||
|
||||
::
|
||||
|
||||
|
@ -121,23 +121,23 @@ Set /etc/zm/zm.conf to root:www-data 740 and www-data access to content
|
|||
a2enmod cgi
|
||||
a2enmod rewrite
|
||||
|
||||
**Step 8**: Enable and start Zoneminder
|
||||
**Step 8:** Enable and start Zoneminder
|
||||
|
||||
::
|
||||
|
||||
systemctl enable zoneminder
|
||||
service zoneminder start
|
||||
systemctl start zoneminder
|
||||
|
||||
|
||||
**Step 9**: Edit Timezone in PHP
|
||||
**Step 9:** Edit Timezone in PHP
|
||||
|
||||
::
|
||||
|
||||
nano /etc/php/7.0/apache2/php.ini
|
||||
|
||||
Search for [Date] (Ctrl + w then type Date and press Enter) and change
|
||||
date.timezone for your time zone. **Don't forget to remove the ; from in front
|
||||
of date.timezone**
|
||||
date.timezone for your time zone, see [this](http://php.net/manual/en/timezones.php).
|
||||
**Don't forget to remove the ; from in front of date.timezone**
|
||||
|
||||
::
|
||||
|
||||
|
@ -150,13 +150,13 @@ CTRL+o then [Enter] to save
|
|||
|
||||
CTRL+x to exit
|
||||
|
||||
**Step 10**: Restart Apache service
|
||||
**Step 10:** Reload Apache service
|
||||
|
||||
::
|
||||
|
||||
service apache2 reload
|
||||
systemctl reload apache2
|
||||
|
||||
**Step 11**: Making sure ZoneMinder works
|
||||
**Step 11:** Making sure ZoneMinder works
|
||||
|
||||
1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console
|
||||
|
||||
|
@ -179,7 +179,8 @@ Easy Way: Ubuntu 14.x
|
|||
-----------------------------------------------------------
|
||||
**These instructions are for a brand new ubuntu 14.x system which does not have ZM installed.**
|
||||
|
||||
**Step 1**: Either run commands in this install using sudo or use the below to become root
|
||||
**Step 1:** Either run commands in this install using sudo or use the below to become root
|
||||
|
||||
::
|
||||
|
||||
sudo -i
|
||||
|
@ -209,40 +210,43 @@ Easy Way: Ubuntu 14.x
|
|||
a2enmod rewrite
|
||||
a2enmod cgi
|
||||
|
||||
**Step 5:**:Some tweaks that will be needed:
|
||||
**Step 5:** Make zm.conf readable by web user.
|
||||
|
||||
Edit ``/etc/init.d/zoneminder``:
|
||||
|
||||
add a ``sleep 10`` right after line 25 that reads ``echo -n "Starting $prog:"``
|
||||
(The reason we need this sleep is to make sure ZM starts after mysqld starts)
|
||||
|
||||
Make zm.conf readable by web user.
|
||||
::
|
||||
|
||||
sudo chown www-data:www-data /etc/zm/zm.conf
|
||||
|
||||
|
||||
**Step 6**: Edit Timezone in PHP
|
||||
|
||||
``sudo vi /etc/php5/apache2/php.ini``
|
||||
Look for [Date] and inside it you will see a date.timezone
|
||||
that is commented. remove the comment and specific your timezone.
|
||||
Please make sure the timezone is valid (see [this](http://php.net/manual/en/timezones.php))
|
||||
|
||||
In my case:
|
||||
**Step 6:** Edit Timezone in PHP
|
||||
|
||||
::
|
||||
|
||||
date.timezone = America/New_York
|
||||
nano /etc/php/7.0/apache2/php.ini
|
||||
|
||||
Search for [Date] (Ctrl + w then type Date and press Enter) and change
|
||||
date.timezone for your time zone, see [this](http://php.net/manual/en/timezones.php).
|
||||
**Don't forget to remove the ; from in front of date.timezone**
|
||||
|
||||
**Step 7**: Restart Apache service
|
||||
::
|
||||
|
||||
[Date]
|
||||
; Defines the default timezone used by the date functions
|
||||
; http://php.net/date.timezone
|
||||
date.timezone = America/New_York
|
||||
|
||||
CTRL+o then [Enter] to save
|
||||
|
||||
CTRL+x to exit
|
||||
|
||||
**Step 7:** Restart Apache service and start ZoneMinder
|
||||
|
||||
::
|
||||
|
||||
service apache2 reload
|
||||
service zoneminder start
|
||||
|
||||
**Step 8**: Making sure ZoneMinder works
|
||||
|
||||
**Step 8:** Making sure ZoneMinder works
|
||||
|
||||
1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console
|
||||
|
||||
|
@ -312,58 +316,8 @@ This should now create a bunch of .deb files
|
|||
|
||||
**Step 5:** Post install configuration
|
||||
|
||||
::
|
||||
|
||||
sudo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"
|
||||
|
||||
sudo a2enmod cgi rewrite
|
||||
sudo a2enconf zoneminder
|
||||
|
||||
|
||||
|
||||
**Step 6:** Fix PHP TimeZone
|
||||
|
||||
``sudo vi /etc/php5/apache2/php.ini``
|
||||
|
||||
Look for [Date] and inside it you will see a date.timezone that is commented. remove the comment and specific your timezone. Please make sure the timezone is valid (see http://php.net/manual/en/timezones.php)
|
||||
|
||||
Example:
|
||||
|
||||
``date.timezone = America/New_York``
|
||||
|
||||
**Step 7:** Fix some key permission issues and make sure API works
|
||||
|
||||
::
|
||||
|
||||
sudo chown www-data /etc/zm/zm.conf
|
||||
sudo chown -R www-data /usr/share/zoneminder/www/api/
|
||||
|
||||
|
||||
**Step 8:** Restart all services
|
||||
|
||||
::
|
||||
|
||||
sudo service apache2 restart
|
||||
sudo service zoneminder restart
|
||||
|
||||
Check if ZM is running properly
|
||||
|
||||
::
|
||||
|
||||
sudo service zoneminder status
|
||||
|
||||
|
||||
**Step 9:** Make sure streaming works - set PATH_ZMS
|
||||
|
||||
open up ZM console in your browser, go to Options->Path and make sure ``PATH_ZMS`` is set to ``/zm/cgi-bin/nph-zms`` and restart ZM
|
||||
|
||||
|
||||
**Step 10:** Make sure everything works
|
||||
|
||||
* point your browser to http://yourzmip/zm - you should see ZM console running
|
||||
* point your browser to http://yourzmip/zm/api/host/getVersion.json - you should see an API version
|
||||
* Configure your monitors and make sure its all a-ok
|
||||
Now that you have installed from your own package you can resume following the
|
||||
standard install guide for your version, start at the step after Install Zoneminder.
|
||||
|
||||
Hints
|
||||
-----
|
||||
|
|
Loading…
Reference in New Issue