ZoneMinder post-installation steps:

1) If not already done, ensure MariaDB/MySQL is configured and running:
    rcctl enable mysqld
    mysql_install_db
    rcctl start mysqld
    mysql_secure_installation

2) For initial ZoneMinder database, run:
    mysql -uroot -p < /usr/local/share/zoneminder/db/zm_create.sql
    mysql -uroot -p -e "grant all on zm.* to \
      'zmuser'@localhost identified by 'zmpass';"
    *Replace 'zmpass' with your own password*
    *Or* run upgrade scripts in /usr/local/share/zoneminder/db
    mysqladmin -uroot -p reload

3) Enable the following PHP extensions in /etc/php-8.4.ini:
    extension=intl
    extension=mysqli
    extension=pdo_mysql
    extension=apcu
    *Set 'date.timezone' as needed*

4) Enable Apache service and configure with the following options:
    LoadModule rewrite_module /usr/local/lib/apache2/mod_rewrite.so
    Include /etc/apache2/extra/httpd-zoneminder.conf
    *Restart Apache service if needed*

5) Start ZoneMinder service:
    rcctl -d start zm

6) Adjust the service startup order:
    rcctl order mysqld apache2 zm
