[sisyphus] zoneminder & apache2 & systemd

lex.shen yandex.ru
3 20:57:45 MSK 2017


 .

  

:

cat /lib/systemd/system/zoneminder.service

# ZoneMinder systemd unit file
# This file is intended to work with all Linux distributions

[Unit]
Description=ZoneMinder CCTV recording and security system
After=network.target mysqld.service httpd2.service
Requires=mysqld.service httpd2.service

[Service]
User=apache
Type=forking
ExecStart=/usr/bin/zmpkg.pl start
ExecReload=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
PIDFile=/var/run/zm/zm.pid
Environment=TZ=:/etc/localtime

[Install]
WantedBy=multi-user.target



systemctl enable zoneminder.service

 :

cat /etc/tmpfiles.d/zoneminder.conf

d /var/run/zm 0775 apache _webserver -
d /var/lock/subsys/zm 2775 apache _webserver -





    (    )  
web- zoneminder  :

cat /etc/php/5.6/apache2-mod_php/php.ini|grep 'date.timezone ='

date.timezone = Europe/Moscow


:

cat /etc/httpd2/conf/extra-available/zoneminder.conf

#zoneminder.conf for apache2
<IfModule alias_module>

  ErrorLog /var/log/httpd2/zm.error.log

  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.

  LogLevel debug

  # Access log

  CustomLog /var/log/httpd2/zm.access.log combined

  Alias /zm /usr/share/zoneminder/www/
  Alias /zoneminder /usr/share/zoneminder/www/

  <Directory /usr/share/zoneminder/www/>
  Options Indexes MultiViews
  AllowOverride All
  Order Allow,Deny
  Allow from all
# Allow from localhost
# Deny from all
  </Directory>

  ScriptAlias /cgi-bin /usr/lib/zoneminder/cgi-bin/

  <Directory /usr/lib/zoneminder/cgi-bin/>
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  AllowOverride All
  Options Indexes MultiViews
  AllowOverride All
  Order Allow,Deny
  Allow from all
# Allow from localhost
# Deny from all
  </Directory>

</IfModule>




a2enextra zoneminder

apachectl configtest

    zonemider.
 .
    zoneminder  systemd    



/lib/systemd/system/zoneminder.service



/etc/tmpfiles.d/zoneminder.conf


   http://localhost/zm     :

MooTools not found! Please check that it was installed correctly in 
ZoneMinder web root.

  :

[Tue Oct 03 20:33:21.669273 2017] [access_compat:error] [pid 14096] 
[client 127.0.0.1:43408] AH01797: client denied by server configuration: 
/usr/share/zoneminder/www/
[Tue Oct 03 20:38:32.466497 2017] [:error] [pid 14898] [client 
127.0.0.1:43502] ERR [Cannot write to content dirs('events','images'). 
Check that these exist and are owned by the web account user]
[Tue Oct 03 20:38:32.839732 2017] [:error] [pid 14898] [client 
127.0.0.1:43502] PHP Warning: disk_total_space(): No such file or 
directory in /usr/share/zoneminder/www/includes/functions.php on line 1448
[Tue Oct 03 20:38:32.877822 2017] [:error] [pid 14898] [client 
127.0.0.1:43502] ERR [disk_total_space returned false. Verify the web 
account user has access to events]
[Tue Oct 03 20:38:33.065912 2017] [core:error] [pid 14901] [client 
127.0.0.1:43510] AH00037: Symbolic link not allowed or link target not 
accessible: /usr/share/zoneminder/www/tools/mootools/mootools-core.js, 
referer: http://localhost/zm/
[Tue Oct 03 20:38:33.104259 2017] [core:error] [pid 14898] [client 
127.0.0.1:43502] AH00037: Symbolic link not allowed or link target not 
accessible: /usr/share/zoneminder/www/tools/mootools/mootools-more.js, 
referer: http://localhost/zm/


:

ls -l /usr/share/zoneminder/www/tools/mootools/
 532
-rw-r--r-- 1 root root 160495 Ԛ 2 17:03 mootools-core-1.4.5-compat.js
lrwxrwxrwx 1 root root 29 Ԛ 2 17:07 mootools-core.js -> 
mootools-core-1.4.5-compat.js
-rw-r--r-- 1 root root 379351 Ԛ 2 17:03 mootools-more-1.5.1.js
lrwxrwxrwx 1 root root 22 Ԛ 2 17:07 mootools-more.js -> 
mootools-more-1.5.1.js


 ޣ   ?

-- 
 ,
 .



Sisyphus