Support #627
Install Zoneminder on Arch
Description
- Table of contents
 - Prepare the Environment
 - Install Zoneminder
 - Start Zoneminder
 - Resources
 
This is a guide for installing Zoneminder on Arch Linux.
Prepare the Environment¶
- Make sure the system is up to date:
pacman -Syu
 
Install yaourt¶
- Install yaourt
 
Install Zoneminder¶
- Install zoneminder from the AUR:
yaourt zoneminder
 
Configure Apache¶
- Edit the apache config:
nano /etc/httpd/conf/httpd.conf
- And add/modify the following to ensure PHP, prefork and cgi are enabled:
#LoadModule mpm_event_module modules/mod_mpm_event.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so LoadModule php5_module modules/libphp5.so LoadModule cgi_module modules/mod_cgi.so
 
 - And add/modify the following to ensure PHP, prefork and cgi are enabled:
 
- Append the Zoneminder inclusion to the apache config:
echo 'Include conf/extra/php5_module.conf' >> /etc/httpd/conf/httpd.conf echo 'Include /etc/httpd/conf/extra/httpd-zoneminder.conf' >> /etc/httpd/conf/httpd.conf
- NOTE: I needed to comment out the 
php_admin_valuein httpd-zoneminder.conf file. 
 - NOTE: I needed to comment out the 
 
Configure PHP¶
- Edit the PHP configuration:
nano /etc/php/php.ini
- Ensure the following extensions are enabled:
extension=pdo_mysql.so extension=gd.so extension=gettext.so extension=mcrypt.so extension=sockets.so extension=openssl.so extension=ftp.so
 - Ensure open_basedir has the following directories added/included:
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/dev/:/etc:/srv/http/zoneminder:/srv/zoneminder/:/var/cache/zoneminder/
 - Set the local timezone:
date.timezone = America/Los_Angeles
 
 - Ensure the following extensions are enabled:
 
Initialize MySQL¶
- Initialize the MySQL database:
cd /usr mysql_install_db --user=mysql --ldata=/var/lib/mysql/
 
- Start and enable MySQL on boot:
systemctl enable mysqld systemctl start mysqld
 
- Secure the installation:
mysql_secure_installation
 
- Import the zoneminder SQL data:
mysqladmin --defaults-file=/etc/mysql/my.cnf -p -f reload cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/my.cnf -p
 
- Set permissions on the zm database for the user zmuser with the password zoneminder 
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zoneminder";' | mysql --defaults-file=/etc/mysql/my.cnf -p mysql
 
- Edit the zoneminder config
nano /etc/zm.conf
- And update the host, database, username, and/or password:
ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zoneminder
 
 - And update the host, database, username, and/or password:
 
Start Zoneminder¶
- Start and enable Apache on boot:
systemctl enable httpd systemctl start httpd
 
- Start and enable zoneminder on boot:
systemctl enable zoneminder systemctl start zoneminder
 
Resources¶
Updated by Daniel Curtis over 10 years ago
- Description updated (diff)
 - % Done changed from 0 to 20
 
Updated by Daniel Curtis over 10 years ago
- Description updated (diff)
 - Status changed from New to In Progress
 - % Done changed from 20 to 40
 
Updated by Daniel Curtis over 10 years ago
- Description updated (diff)
 - Status changed from In Progress to Resolved
 - % Done changed from 40 to 100