Installing zoneminder on Fedora 10

By gill, 21 December, 2008

Install Fedora 10 (I used the Mauriat Miranda's Guide):
You may need to put /var on a separate file system. I ran out of inodes when my SQL database and event filters filled the file system of inodes before running out of space. I chose to create an xfs filesystem for /var (we'll see if that holds)
Zoneminder needs mySQL and Apache, so install them if you didn't during the F10 install; I also like phpMyAdmin:
yum -y install mysql-server httpd phpMyAdmin
Start mysql; it tells you to change your password -- do that too.

/sbin/service mysqld start
/usr/bin/mysqladmin -u root password 'new-pasword'

I like to install a few extras:
ffmpeg so zoneminder can make mpg's of your events; mplayer so you can play them locally, and tvtime so I can see my monitors directly outside of zoneminder for debugging purposes.
yum -y install ffmpeg mplayer tvtime

Then I install zoneminder from the Fedora repo:
yum -y install zoneminder
Set up the database:
mysql -p -u root mysql < /usr/share/zoneminder/db/zm_create.sql
mysqladmin -p -u root reload

Edit the configuration in /etc/httpd/conf.d/zoneminder.conf (while you're there you can also tune up your httpd.conf and phpMyAdmin.conf)
I need to set up e-mail on this box so zoneminder can send me messages:
yum -y install sendmail-cf perl-MIME-Lite perl-MIME-tools perl-Archive-Zip perl-Archive-Tar
Then change my sendmail.mc to forward its e-mail to my mail server:

define(`SMART_HOST', `myserver.mydomain.net')dnl
LOCAL_DOMAIN(`mydomain.net')dnl
MASQUERADE_AS(`mydomain.net')dnl

Do a make, and restart sendmail to catch your changes.
Check your firewall configuration, and if necessary add this to your /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
Now I can start mysql and httpd to go into the configuration. In the Paths section I set the logs to go into /var/log/zoneminder with the rest of my system logs. I also set the rlogsysd to put its zoneminder messages there too:

*.info;local1.!*;mail.none;authpriv.none;cron.none /var/log/messages
# Zoneminder messages go here
local1.* /var/log/zoneminder/zoneminder.log

Bounce the syslog daemon to catch your changes:
kill -HUP $(cat /var/run/syslogd.pid)

Set the services to start when you reboot:

chkconfig zoneminder on
chkconfig httpd on
chkconfig mysqld on

I go into zoneminder config and set up all my preferences, and new monitors.
Now I'm good to go!

Private
No