Page 1 of 2

Building ZM for OpenSuse 11.1, Help

Posted: Thu Jan 15, 2009 5:36 am
by we4zonM
Trying to build Zoneminder 1.23 for OpenSuse 11.1, KDE version. The configure says that it requires mysql, and I have installed it, but now it complains of no mysql.h found. Where can I find this to install the mysql.h file, and what other dependencies would need to be installed as well? I searched with the Yast Software Management and could not find a package that would install the mysql.h file. What is the name of the package needed that will have the mysql headers and libraries for OpenSuse 11.1?

Edit: If you are trying to build Zoneminder for OpenSuse 11.1, there is a wiki for an earlier version 10.1 here: ... ZoneMinder

Reply to this post if you have answers to any of its questions! Thx.

Posted: Thu Jan 15, 2009 8:14 am
by we4zonM
There are many dependencies that are needed for OpenSuse 11.1, and sorting them out one by one when trying to compile and build is tedious. Some of the required packages are in non-standard repositories, such as the "Monex" or OBS project repositories. Why isn't Zoneminder included in standard OpenSuse 11.1 installation media? Why aren't the dependencies needed by ZoneMinder included in the OpenSuse 11.1 installation dvd?

Some errors that took some time to sort out included the missing "mysql.h", and the missing perl PHP::serialization, among others.

Now, after building it, trying to find out how to use it (I have used it before!) is a pain. I searched for "zoneminder" and found nothing. The install added "zma, zmc, zmu, zms, zmf, and zmfix", but "man zma", "man zmc" etc gave nothing! using the --help option gives nothing of use. There is documentation online, but why can't documentation be provided with the package? A text file howto use or install would be great. A text output telling the user where to find the howto when issuing the "make install" command would also be great.

Posted: Thu Jan 15, 2009 8:40 am
by we4zonM
I have decided that Zoneminder is not user-friendly! Last time that I used it, it did take some time to get it setup and to work, but I did find some documentation that helped it along the way, and that was for an earlier version. Kept this in the same post, since it is related to the install and configuration of zoneminder.

Now, getting error:

"Cant connect to local MySQL server through socket /var/lib/mysql/mysql.sock"

Man page on mysql was not helpful in sorting that out.

Posted: Thu Jan 15, 2009 9:17 am
by we4zonM
From searching the forums, found topic 11204 and 9874. Then, which is not in the wiki documentation for the build and installation, I did:
/etc/init.d/mysql restart

Now on "mysql < db/zm_create.sql" get

ERROR 1044 (42000): Access denied for user '@'localhost to database 'mysql'.

Posted: Thu Jan 15, 2009 9:34 am
by we4zonM
Searching and finding topic 5498, it looks like the Wiki documentation left out some terms in the Installation from Sources steps. The permissions with mysql!

Needed to append "-u root -p" to the mysql commands to get it to work. Now at the "make install" step, get a new error:

make install: chown invalid user apache:apache
make [4] *** [install-data-hook] Error 1
and errors for [install-am], [install-data-am], [install-recursive]

Great. It would be helpful if the documentation is updated!

Posted: Thu Jan 15, 2009 9:43 am
by we4zonM
Searching, found topic 6214. What is interesting is that I have both /var/www/cgi-bin and /srv/www/cgi-bin as well as both /var/www/html and /srv/www/html, so what difference does it make what pair is selected for "webdir" and for "cgidir"? There was no documentation on that!

From topic 6214, it looks like I need to specify a user and a group (apache:apache error) for "www" settings. What are these settings and why are they needed? Again, documentation is lacking!

Posted: Thu Jan 15, 2009 9:54 am
by we4zonM
Got it to build, and to install. Now, it will not start!

"warning, overriding installed ./zm.conf file with local copy."
"DBI connect (database=zm, host=localhost, zmuser..)"
"access denied for user zmuser@localhost"

Again, documentation is needed! Now I need to use the right user name and password to start Zoneminder, and I will finally, yes, finally be at the point to try to open the web browser! If you have not used Zoneminder, it runs from a web browser, and that is how you add cameras and set zones! First time, it was a pain to find documentation on how to use it, because I did not know you had to use a web browser interface and I could not find any man pages to tell me how to use Zoneminder! Again, not user-friendly!

Posted: Thu Jan 15, 2009 10:07 am
by cordel
Sorry I personally don't know anything about Suse other than it's another distro split from Redhat. The reason it's not in Suse is Suse has not put it there, as to why, they must have their own reasons.. I have no idea why.

The database is loaded by the mysql < db/zm_create.sql
the file zm_create.sql is a txt file in mysql script to load it and is created after the make process.

As far as being easy, we never make that claim, as there is allot of components involved in ZM as you know buy now, and all the separate distros do things differently. There is no way a couple people can keep up on all that specially volunteering there time.

I would suggest using a live cd, ubuntu 8.04, or Fedora as these are already packaged in repositories and have many kinks specific to those distros already worked out including all the correct configuration compiled in them. At this time those are the easiest ways to go.

The documentation in the wiki is mostly constructed by other users here in the forum with the exception of the documentation link.

Builds vary not only by distro but sometimes by a distro version. again hard to keep up with when we might have only 4 hours a week to contribute.

Posted: Thu Jan 15, 2009 10:22 am
by we4zonM
How can I change the user name and password for the database that Zoneminder uses without rebuilding the entire Zoneminder? I did get it to build, and now I am trying to configure it!

I am using the " start" command.

A live cd is not going to work for me. That is why I am sorting through the build process, and almost have it starting.

Posted: Thu Jan 15, 2009 10:54 am
by we4zonM
Searching forums, found answer. Edit file /usr/local/etc/zm.conf or /etc/zm/zm.conf on other distro.

Now, it gets past the database access error. Another error:

Use of uninitialized value in transliteration (tr///) at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/ line 82, <CONFIG> line 50.
Can't use an undefined value as a symbol reference at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/ line 83, <CONFIG> line 50.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/ line 100, <CONFIG> line 50.
Compilation failed in require at /usr/lib/perl5/site_perl/5.10.0/ line 33, <CONFIG> line 50.

Posted: Thu Jan 15, 2009 11:56 am
by we4zonM
Searching. Tried to find out more about how to use mysql, went to While mysql is another program, and not Zoneminder, so you would think there would be no need to have mysql documentation in the Zoneminder wiki, but unless you have properly configured mysql and the database, then Zoneminder will not work. And if you try to do anything other than the default install, there is no documentation to help you! No examples of how to change the database!

How can I tell Zoneminder to use a different database, and how can I create a new database? This is were I am stuck now, in this effort to get the OpenSuse 11.1 build to start!

Posted: Thu Jan 15, 2009 9:26 pm
by we4zonM
Some manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
"Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
From the README for mysql, you can take a look at the features section of the manual. I thought they meant the man pages, but "man mysql" has no features section! It does have a tips, sever side help, commands, and options section! There is no manual in the README directory from the user documentation. From the man page, it looks like mysql needs a server to be running, and the server is lo and behold, a mysql server! While I already found this out in step 2 or 3 of this post, reading it was nice.

Posted: Thu Jan 15, 2009 9:37 pm
by we4zonM
From reading the wiki, I think that I need to also have apache running, but I have not found the documentation for it. Two new things to learn about, mysql, and apache. There is no "man apache2ctl"? The user documenation for apache tells you to read about it on their web page. There is no man "apache" either. Searching for apache documentation to install.

Found some, installed Suse apache2-doc. From the maual, "/usr/local/apache2/bin/apachectl" is to be used, but there is no such program installed! It is called "apache2ctl"!

The fated moment: apache2ctl start
apache2ctl start
httpd2: Syntax error on line 188 of /etc/apache2/httpd.conf: Could not open configuration file /etc/apache2/sysconfig.d/include.conf: No such file or directory
Searching. It looks like the include.conf gets created when you start the service. There was nothing missing in the install. What command to use to start the apache service? Found it. Use the init script.

Now back to same error on starting Zoneminder:
Use of uninitialized value in transliteration (tr///) at /usr/lib/perl5/site_perl/5.10.0/ZoneMinder/
Searching. Found out that perl is a programming language! Is there something I forgot in ""?
Use of uninitialized value in transliteration (tr///)
What is a "transliteration"?

Posted: Fri Jan 16, 2009 1:12 am
by we4zonM
Searching. Found there is a Zoneminder log to take a look at called "zmpkg.log". This file is not found, because have not successfully started Zoneminder yet.

What is the mysql command to show me what databases there are?

Posted: Fri Jan 16, 2009 2:41 am
by we4zonM
Sorting through mysql database issues. How do I add the user and password to the mysql database? How can I find out what databases mysql has? How can I add the user with the @localhost instead of with @ %?

Retried. Got Zoneminder to get past the start. Now, getting this error:
ERROR 404, object not found
Is there something else that I need to do to get to the start of Zoneminder? I think that I am almost there...There now is a log!
zmpkg[26905].INF [Command: start]
Searching. Found another error, this one with apache2:
Failed to change_hat to HANDLING_UNTRUSTED_INPUT
Searching. From Wiki, Installing from Souce,
Now fire up your web browser, point it at your zm.php and off you go.
How do you do that? My zm.php file is at /var/www/html/zm.php and pointing the browser to that file asks me if I want to save it?

Searching. Error 404 has a link to contact the webmaster. Sent email to the webmaster asking for help.