87 lines
3.0 KiB
Plaintext
87 lines
3.0 KiB
Plaintext
|
New installs
|
||
|
============
|
||
|
|
||
|
1. Unless you are already using the MySQL server or you are running it
|
||
|
remotely you will need to ensure that the server is installed and secured:
|
||
|
|
||
|
yum install mysql-community or
|
||
|
|
||
|
yum install mysql (Mariadb)
|
||
|
|
||
|
sudo systemctl mysqld enable
|
||
|
|
||
|
sudo system mysqld start
|
||
|
|
||
|
mysql_secure_installation
|
||
|
|
||
|
2. You will need to create the ZoneMinder database. These commands should do
|
||
|
the trick, assuming your database server is local:
|
||
|
|
||
|
mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
|
||
|
mysqladmin reload
|
||
|
|
||
|
3. The database needs a user. One is not created by default because this would
|
||
|
introduce an obvious security issue. The following should set this up:
|
||
|
|
||
|
mysql -u root -p
|
||
|
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
|
||
|
|
||
|
Obviously, change at least zmpass to an actual, secure password or
|
||
|
passphrase. You can change zmuser as well if you like.
|
||
|
|
||
|
4. Edit /etc/zm.conf and, at the bottom, change ZM_DB_PASS and perhaps
|
||
|
ZM_DB_USER to match.
|
||
|
|
||
|
5. Edit /etc/php.ini, uncomment the date.timezone line, and add your local
|
||
|
timezone. For whatever reason, PHP will complain loudly if this is not set,
|
||
|
or if it is set incorrectly, and these complaints will show up in the
|
||
|
zoneminder logging system as errors.
|
||
|
|
||
|
If you are not sure of the proper timezone specification to use, look at
|
||
|
http://php.net/date.timezone
|
||
|
|
||
|
6. This package probably does not work with SELinux enabled at the moment. It
|
||
|
may be necessary to disable SELinux for httpd, or even completely for
|
||
|
ZoneMinder to function. This will be addressed in a later release. Run
|
||
|
|
||
|
setenforce 0
|
||
|
|
||
|
for testing, and edit /etc/sysconfig/selinux to disable it at boot time.
|
||
|
|
||
|
7. The zoneminder.service file fails at present but the zmpkg.pl script
|
||
|
can be run as root to start zoneminder.
|
||
|
|
||
|
sudo zmpkg.pl start
|
||
|
|
||
|
8. The ZoneMinder web interface is disabled by default (which makes it rather
|
||
|
useless but also secure by default), you will need to edit
|
||
|
/etc/httpd/conf.d/zoneminder.conf to enable it. Afterwards, you can start
|
||
|
the web server:
|
||
|
|
||
|
sudo systemctl enable httpd.service
|
||
|
sudo systemctl start httpd.service
|
||
|
|
||
|
9. You should immediately visit http://localhost/zm and secure the system if
|
||
|
it is network facing. To do this:
|
||
|
|
||
|
a) click Options, then System.
|
||
|
b) check OPT_USE_AUTH.
|
||
|
c) set AUTH_HASH_SECRET to a random string.
|
||
|
d) click Save and refresh the main browser window.
|
||
|
e) You should be prompted to log in; the default username/password is admin/admin.
|
||
|
f) Open Options again, choose the newly visible Users tab.
|
||
|
g) click the admin user and set a password.
|
||
|
|
||
|
|
||
|
Upgrades
|
||
|
========
|
||
|
|
||
|
1. Update /etc/zm.conf. Check for any new settings and update the version
|
||
|
information. Comparing /etc/zm.conf and /etc/zm.conf.rpmnew should help to
|
||
|
do this.
|
||
|
|
||
|
2. You will need to upgrade the ZoneMinder database as described in the
|
||
|
manual. This command should be sufficient when run as root:
|
||
|
|
||
|
zmupdate.pl --user=root --pass={mysql_root_pwd} --version=<from version>
|