Installing using ZoneMinder RPMs for SuSE

From ZoneMinder Wiki
Jump to: navigation, search
ZoneMinderSuSERPMS.png

This is a short How-to for installing ZoneMinder on openSUSE with RPMs Currently RPMS are available for openSUSE 42.3 and openSUSE 15.0 architectures are x86_64.

There are two versions available for every above listed SuSE version even one which requires only the packages that comes with the official SuSE release. These packages have some missing features of ZoneMinder like ffmpeg support and mjpeg streaming from remote cameras. The other version is build against the packages from VLC ([1]) and do not lack these features. They can be identified by the "MP" in the package name, for example ZoneMinder-MP-1.28.1-1.1.x86_64.rpm.


Installation of openSUSE

Install SuSE on any supported way on your system. Detailed installation instruction are listed at [2].


Installation of ZoneMinder

using YaST

The best and easiest way is to install the ZoneMinder package via YaST. First you have to find out which SuSE version you are using. The urls to the different repositories are:

openSUSE Leap 15.0: http://www.liquid-co.de/pub/suse/repositories/15.0/


openSUSE Leap 42.3: http://www.liquid-co.de/pub/suse/repositories/42.3/


Depreciated openSUSE versions (repository is still there but not updated anymore)

SuSE 10.0: Last ZoneMinder version: 1.22.3 http://www.liquid-co.de/pub/suse/repositories/discontinued/10.0/

SuSE 10.1: Last ZoneMinder version: 1.23.3 http://www.liquid-co.de/pub/suse/repositories/discontinued/10.1/

openSUSE 10.2: Last ZoneMinder version: 1.23.3 http://www.liquid-co.de/pub/suse/repositories/discontinued/10.2/

openSUSE 10.3: Last ZoneMinder version: 1.24.2 http://www.liquid-co.de/pub/suse/repositories/discontinued/10.3/

openSUSE 11.0: Last ZoneMinder version: 1.24.2 http://www.liquid-co.de/pub/suse/repositories/discontinued/11.0/

openSUSE 11.1: Last ZoneMinder version: 1.24.2 http://www.liquid-co.de/pub/suse/repositories/discontinued/11.1/

openSUSE 11.2: Last ZoneMinder version: 1.24.2 http://www.liquid-co.de/pub/suse/repositories/discontinued/11.2/

openSUSE 11.3: Last ZoneMinder version: 1.25.0 http://www.liquid-co.de/pub/suse/repositories/discontinued/11.3/

openSUSE 11.4: Last ZoneMinder version: 1.27.0 http://www.liquid-co.de/pub/suse/repositories/discontinued/11.4/

openSUSE 12.1: Last ZoneMinder version: 1.27.0 http://www.liquid-co.de/pub/suse/repositories/discontinued/12.1/

openSUSE 12.2: Last ZoneMinder version: 1.27.0 http://www.liquid-co.de/pub/suse/repositories/discontinued/12.2/

openSUSE 12.3: Last ZoneMinder version: 1.27.0 http://www.liquid-co.de/pub/suse/repositories/discontinued/12.3/

openSUSE 13.1: http://www.liquid-co.de/pub/suse/repositories/discontinued/13.1/

openSUSE 13.2: http://www.liquid-co.de/pub/suse/repositories/discontinued/13.2/

openSUSE Leap 42.1: http://www.liquid-co.de/pub/suse/repositories/discontinued/42.1/

openSUSE Leap 42.2: http://www.liquid-co.de/pub/suse/repositories/discontinued/42.2/

Now you have to add the adequate repositories to YaST. Start YaST and go to "installation source". Select "add" and choose "http" as protocol. Enter as server "liquid-co.de" and as path "pub/suse/repositories/10.x". For more details on how to add package repositories to YaST go to [3].

Optional you can add one packman repository from [4] so that it is possible to install the RPM build against the packman RPMs with mjpeg streaming support and dependencies to ffmpeg. However, newer versions of the ZoneMinder-MP package require the VLC repository.

Now go to YaST->Softwaremanagement search for ZoneMinder and select the version you want (either ZoneMinder or ZoneMinder-MP). Keep in mind that ZoneMinder-MP requires the VLC repository. Then proceed as normal, all other required packages will be resolved due to dependencies.

using one-click-install (openSUSE >= 10.3)

openSUSE 10.3 offers an installation by only one click. Just click on the following button. If you prefer the non MP version use the following link: Install normal version

If you prefer the MP version use this one. If you don't already added one packman repository you can select one packman repository during the one-click-install dialogue. install MP version

using Yum

You must have already installed Yum to use this way of installation. Yum easily can be installed via Yast. Choose the adequate link for your SuSE version above and download the ZoneMinder.repo file. (http://www.liquid-co.de/pub/suse/repositories/10.x/ZoneMinder.repo) and copy it to /etc/yum.repos.d/. Then run:

yum install ZoneMinder

which will list you the two available versions of ZoneMinder. Choose your wanted version and install ZoneMinder. All required packages will be installed automaticly.

Note: To install the RPM build against the packman RPMs with mjpeg streaming support and dependencies to ffmpeg you must have added the packman repository to Yum before.

Manual installation through rpm command

Download your choosen RPM from the listed repositories. Start root console and run:

rpm -ivh <ZoneMinder package>

Note: When you choose this way you have to resolve the package dependencies all by yourself. So the other methods are recommended.

Setting up MySQL and Apache

After you successfully installed all RPMs start root console. Before you proceed to start Apache you should verify the timezone (date.timezone) in /etc/php5/apache2/php.ini. If the timezone isn't configured properly the hashed based authentication might not work. For a list of valid timezones have a look at [5].

Now start Apache and MySQL by issuing the following commands:

openSUSE 12.1 and newer (systemd):

systemctl start mysql.service
systemctl start apache2.service

Note for systemd users: all output is redirected to /var/log/messages instead of printing them on stdout and stderr which means if something goes wring you should have a look at /var/log/messages.

openSUSE 11.4 and prior:

rcmysql start
rcapache2 start

When this is the first time you start MySQL it is highly recommended to set up a root password after you've started MySQL by invoking mysql_secure_installation.

mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
     SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] 
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] 
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] 
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] 
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] 
 ... Success!

Cleaning up...



All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


When you plan to start ZoneMinder at boot, you can now add Apache and MySQL for automatic start by typing:

openSUSE 12.1 and newer (systemd):

systemctl enable mysql.service
systemctl enable apache2.service


openSUSE 11.4 and prior:

chkconfig apache2 on
chkconfig mysql on

Note: Of course you can also use YaST Runleveleditor for this task.

Initializing ZoneMinder

Log in into root console and run:

zm_database_init

and follow the steps on the screen. This script will setup the ZoneMinder database, creating the zm_admin user for database access and update the /etc/zom.conf with the new set password for zm_admin user. Example output:

zm_database_init
INFO: when db is correctly installed and you just reinstalled rpm, then answer all questions with 'n'
Enter mysql root password: 
generated/updated ~/.my.cnf
run mysql command to create db as user root? [Y/n]: 
create user zm_admin for zoneminder? [Y/n]: 
enter new passwd for user zm_admin: 
retype password: 
should the config file updated with the new passwd? [Y/n]: 
database successfully initialized
you can now start ZonMinder with rczmstart or systemctl start zm.service
removing lock file

Important Note: If you entered the wrong mysl root password or changed the mysql root password and you get something like Permission denied for user root when running zm_database_init (you don't get prompted for the mysql root password again) you have to edit /root/.my.cnf and enter the correct mysql root password there or remove that file to get prompted for the root password again (during execution of zm_database_init). After that run zm_database_init again which should now proceed as desired.

Then run the following command to start ZoneMinder:

openSUSE 12.1 and newer (systemd):

systemctl start zm.service

Note for systemd users: all output is redirected to /var/log/messages instead of printing them on stdout and stderr which means if something goes wring you should have a look at /var/log/messages.

openSUSE 11.4 and prior:

rczm start

To enable the start of ZoneMinder at boot enter:

openSUSE 12.1 and newer (systemd):

systemctl enable zm.service

openSUSE 11.4 and prior:

chkconfig zm on

After this ZoneMinder will start at boot after apache2 and mysql were started.


After successfully installation the ZoneMinder web interface can be reached at http://localhost/zm

Hint: Since openSUSE 10.3 PHP short_open_tag is disabled by default. The RPM now includes a config file for apache to avoid a manual edit. The only thing you have to do is to restart apache after the installation (rcapache2 restart)!


Note: When trying to run rczm start without running zm_database_init the start will fail.

Update ZoneMinder

When new version of ZoneMinder or of the RPMs are available you might want to update your existing installation. You can use YaST again for this task. Before you enter YaST run "rczm stop" to stop ZoneMinder. Go to YaST -> Softwaremanagement and search for ZoneMinder. Switch the checkbox to "upgrade" (look for icon explaining in YaST or in textmode for ">"). Choose your wanted version as described in Installation of ZoneMinder and proceed. After installation run zm_database_init and follow the steps on the screen to update your database.

Note: When upgrading without ZoneMinder version change, this happens for example when upgrading from one rpm version to a later RPM version (for example from ZoneMinder-1.22.3-10.x86_64.rpm to ZoneMinder-1.22.3-11.x86_64.rpm ) then the database is already installed and no database upgrade is necessary. In this case, when you will be asked weather to create zm database or to create the zoneminder database user, you have to answer all questions from the zm_database_init script with "no".

Note: If not stopping ZoneMinder (rczm stop) before upgrading you might get an information box with "... failed". you can ignore this box, but after installation ZoneMinder will be stopped.

      • Due to package name change of the MP package you have to run "cp /etc/zm.conf.rpmsave /etc/zm.conf" and before "zm_datbase_init" when upgrading the MP package from 1.22.3 to 1.23.x. Finally you have to rerun "chkconfig zm on" when you want to start ZoneMinder at boot. For more detailed informations look at Switching between MP and non MP version.

Upgrade from manual installation to RPM

When upgrading from a manual installation from ZoneMinder to any RPM version remove all related zoneminder files except the config file /etc/zm.conf. Then install the RPM and follow the steps listed in Installation of ZoneMinder.

Switching between MP and non MP version

Follow the steps described at Installation of ZoneMinder. Because ZoneMinder-MP and ZoneMinder packages are conflicting YaST will report a conflict. Resolve the dependencies by deleting the unwanted ZoneMinder version. After finished installation you have to replace the new installed configuration file by typing (as root):

cp /etc/zm.conf.rpmsave /etc/zm.conf

the run zm_database_init if this is not an update of ZoneMinder (compare to Update Zoneminder) and answer all questions with no otherwise follow the update steps on the screen.

Note: After switching between MP and non MP version you have to run "chkconfig zm on" again if you want to start ZoneMinder at boot.


Uninstalling ZoneMinder

If you are uninstalling ZoneMiner the database will be untouched, the recorded events and logfiles will reside on the disk and the zm.conf file in /etc will be copied to zm.conf.rpmsave.

Info on Shared Memory

Since package version 1.25.0-44 ZoneMinder is compiled with mmap enabled. This should simplify the shared memory handling by using /dev/shm. The available space by default is half of the available RAM.

To adjust the shared memory settings for prior versions have a look at the FAQ Section.