1. INSTALL ZFS UTILITY :
–> sudo apt install zfsutils-linux
2. HDD POOL :
–> sudo fdisk -l
–> sudo zpool create new-pool /dev/sdb /dev/sdc
3. INSTALL ZONEMINDER :
–> sudo apt-get install apache2 -y
test …. http://localhost/
–> sudo apt-get install php
–> sudo /etc/init.d/apache2 restart
–>sudo apt-get install mysql-server -y
–>wget https://raw.githubusercontent.com/ZoneMinder/ZoneMinder/master/utils/do_debian_package.sh
–> chmod a+x do_debian_package.sh
–> sudo apt-get install devscripts
–> sudo ./do_debian_package.sh –snapshot=stable –type=local
–> sudo gdebi zoneminder_<version>_<arch>.deb
–> sudo chmod 740 /etc/zm/zm.conf
–> sudo chown -R www-data:www-data /usr/share/zoneminder/
–> sudo a2enmod rewrite
–> sudo a2enconf zoneminder
–> sudo a2enmod expires
–> sudo a2enmod headers
–> sudo systemctl enable zoneminder
–> sudo systemctl start zoneminder
–> sudo systemctl reload apache2
test –> http://127.0.0.1/zm
4. USING DEDICATED HARD DRIVE
1. Become root or “sudo -s” to gain root privs.
2. Stop Zoneminder. “service zoneminder stop”, “/usr/bin/zmpkg.pl stop”, or “systemctl stop zoneminder”
3. Mount your new partition onto the root filesystem, ensuring it is automatically remounted at boot time by editing /etc/fstab
4. Locate Zoneminder’s “events” and “images” directories. In Debian and Ubuntu, these are under /var/cache/zoneminder. In CentOS and Fedora, these are under /var/lib/zoneminder.
Add these lines in fstab to bind-mount an alternate location:
/dev/sdX1 /newdrive ext3 defaults 0 2
/newdrive/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2
/newdrive/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2
or in some cases,
/newdrive/zoneminder/images /var/lib/zoneminder/images none defaults,bind 0 2
/newdrive/zoneminder/events /var/lib/zoneminder/events none defaults,bind 0 2
or if you have a separate partition for each:
/dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2
/dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2
5. Ensure ZoneMinder can write to the new destination by changing the owner and group to that of the web server user account. Debian based distros typically use “www-data” as the web server user account while many rpm based distros use “apache”.
chown -R apache:apache /newdrive/zoneminder
6. Finally, mount /newdrive and test your fstab entries (“mount -a”). Restart zoneminder ( “service zoneminder start”, “/usr/bin/zmpkg.pl start”, or “systemctl start zoneminder”) Monitor its operation and ensure new events are being created normally and are viewable. Zoneminder should also update the “Disk: %%” on its Console screen to reflect the disk space on its new partition.
(sumber : wiki.zoneminder.com, forums.linuxmint.com, ubuntu.com)