So last night I too did a clean Arch Linux build and ZoneMinder and it's working fine. I assume your Arch Linux install was akin to this... if not maybe my setup will help:
Code: Select all
# Just after the Arch Linux install: Update the system and reboot
pacman -Syu
pacman -Syu
reboot
# Install required packages
pacman -S \
sudo \
openssh \
lesspipe \
vim \
git \
svn \
x264 \
ffmpeg \
openssl \
apache \
php \
php-apache \
mysql \
libv4l \
gnutls \
libjpeg-turbo \
perl-yaml \
perl-dbi \
perl-dbd-mysql \
perl-getopt-long \
perl-timedate \
perl-time-hires \
perl-date-manip \
perl-libwww \
perl-device-serialport \
perl-mime-tools \
perl-mime-lite \
perl-archive-zip \
perl-net-smtp-ssl
My ZoneMinder build was something like so:
Code: Select all
# Sorry about the [blah] busniess it won't let me post with the url syntax...
cd /usr/src
svn co [http][colon][forward slash][forward slash]svn[dot]zoneminder[dot]com/svn/zm/trunk zm
cd /usr/src/zm
./configure \
--prefix=/usr/lib/zm \
--sysconfdir=/etc/zm \
--with-webhost=localhost \
--with-webuser=http \
--with-webgroup=http \
--with-webdir=/var/lib/zm/www \
--with-cgidir=/var/lib/zm/cgi-bin \
--enable-debug=yes \
--enable-mmap \
ZM_DB_HOST=localhost \
ZM_DB_NAME=zm \
ZM_DB_USER=zmuser \
ZM_DB_PASS=zmpass \
CPPFLAGS="-D__STDC_CONSTANT_MACROS"
# Followed by
make && make install
# Setup the ZoneMinder database and default user
/etc/rc.d/mysqld start
mysql -u root < db/zm_create.sql
mysql -u root -e "grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';"
# Make sure ZoneMinder knows where the cgi lives
mysql --user=zmuser --password=zmpass --host=localhost zm -e "UPDATE Config SET Value='/cgi-zm/nph-zms' WHERE Name='ZM_PATH_ZMS';"
# Install the cambozola
cd /usr/src
wget [http][colon][forward slash][forward slash]www[dot]charliemouse[dot]com:8080/code/cambozola/cambozola-latest.tar.gz
tar -xzvf cambozola-latest.tar.gz
cd $(ls -d */ | grep cambozola)
cp ./dist/cambozola.jar /var/lib/zm/www
chown http:http /var/lib/zm/www/cambozola.jar
Make sure Apache is setup correctly
Code: Select all
vi /etc/httpd/conf/httpd.conf
# Insert this after LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
# Add these two lines at the end of the "Include" list (or as the last two lines in the file)
Include conf/extra/php5_module.conf
Include conf/extra/httpd-zm.conf
# Uncomment this line
TypesConfig conf/mime.types
# Next setup php as a mime type by adding this line
vi /etc/httpd/conf/mime.types
application/x-httpd-php php php5
Verify the PHP mysql extension is avaliable. Also, I had to change the short_open_tag to fix a PHP parsing error:
Code: Select all
sed -i 's/;extension=mysql.so/extension=mysql.so/' /etc/php/php.ini
sed -i 's/short_open_tag = Off/short_open_tag = On/' /etc/php/php.ini
There should be no reason to change the permissions of /usr/share/pear You just need to append the paths to open_basedir this is what mine looks like
Code: Select all
vi /etc/php/php.ini
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/etc/zm/:/var/lib/zm/
As you can see from my configure line I did not build into /srv/http as I will use the httpd-zm.conf file to manage the ZoneMinder web instance.
Code: Select all
vi /etc/httpd/conf/extra/httpd-zm.conf
# /etc/httpd/conf/extra/httpd-zm.conf
# Config for zoneminder web app
Alias /zm "/var/lib/zm/www"
<Directory "/var/lib/zm/www">
Options -Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-zm "/var/lib/zm/cgi-bin"
<Directory "/var/lib/zm/cgi-bin">
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Quick edit I'm adding the /etc/rc.d/zm script since I cleaned it up yesterday.
Code: Select all
vi /etc/rc.d/zm
#!/bin/bash
# Source function library.
. /etc/rc.conf
. /etc/rc.d/functions
prog=ZoneMinder
ZM_CONFIG="/etc/zm/zm.conf"
if [ -f $ZM_CONFIG ]; then
. $ZM_CONFIG
command="$ZM_PATH_BIN/zmpkg.pl"
else
stat_busy "$prog Configuration File Not Found: $ZM_CONFIG"
stat_fail
exit 1
fi
start() {
stat_busy "Starting $prog"
$command start
RETVAL=$?
[ $RETVAL = 0 ] && stat_done
[ $RETVAL != 0 ] && stat_fail
return $RETVAL
}
stop() {
stat_busy "Stopping $prog"
$command stop
RETVAL=$?
[ $RETVAL = 0 ] && stat_done
[ $RETVAL != 0 ] && stat_fail
return $RETVAL
}
status() {
result=`$command status`
stat_busy "Checking $prog status"
if [ "$result" = "running" ]; then
status_started
RETVAL=0
else
status_stopped
RETVAL=1
fi
return $RETVAL
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
status
;;
*)
echo "Usage: $0 { start | stop | restart | status }"
RETVAL=1
;;
esac
exit $RETVAL
Make sure to make it executable
Lastly setup the system startup daemons:
Code: Select all
vi /etc/rc.conf
DAEMONS=(hwclock syslog-ng network netfs crond sshd httpd mysqld zm)
After all that I rebooted and ZoneMinder was good to go!
Note: On my server I have other pages I will be serving. So assuming my server's IP is 192.168.0.2 the URL for ZoneMinder is 192.168.0.2/zm
If you want Apache to bounce you over to ZoneMinder, create an index.html in /srv/html/ with this inside:
Code: Select all
vi /srv/html/index.html
<html>
<head>
<meta http-equiv="Refresh" content="0; url=/zm/">
</head>
<body>
<p>This way to <a href="/zm/">ZoneMinder</a>!</p>
</body>
</html>
Then make sure it has the right owner and permissions:
Code: Select all
chown http:http /srv/html/index.html
chmod 644 /srv/html/index.html