Add an sqlite3 FLAVOR (usefull for proxies and testing).

Add corresponding documentation and rework some parts of README.OpenBSD.
Add FLAVORS description to DESCR-server.

input from and ok sthen@
This commit is contained in:
ajacoutot 2010-05-04 05:51:22 +00:00
parent 2a82342e49
commit a1fc06d0e6
4 changed files with 46 additions and 12 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.22 2010/05/03 11:58:45 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.23 2010/05/04 05:51:22 ajacoutot Exp $
COMMENT-main = network and application monitoring - agent
COMMENT-server = network and application monitoring - server
@ -6,13 +6,15 @@ COMMENT-web = network and application monitoring - web frontend
VERSION = 1.8.2
DISTNAME = zabbix-${VERSION}
FULLPKGNAME-main = zabbix-agent-${VERSION}p2
FULLPKGNAME-main = zabbix-agent-${VERSION}p3
FULLPKGPATH-main = net/zabbix,-main
PKGNAME-server = zabbix-server-${VERSION}p0
FULLPKGNAME-web = zabbix-web-${VERSION}p1
PKGNAME-server = zabbix-server-${VERSION}p1
FULLPKGNAME-web = zabbix-web-${VERSION}p2
FULLPKGPATH-web = net/zabbix,-web
CATEGORIES = net
MAJV = ${VERSION:C/^([0-9]+\.[0-9]+).*/\1/}
HOMEPAGE = http://www.zabbix.com/
# GPLv2
@ -27,9 +29,9 @@ MODULES= converters/libiconv
MULTI_PACKAGES = -main -web
PSEUDO_FLAVORS = no_server
FLAVORS = mysql pgsql
FLAVORS = mysql pgsql sqlite3
SUBST_VARS += PREFIX-web ZABBIX_WEB
SUBST_VARS += PREFIX-web ZABBIX_WEB MAJV
WANTLIB = c kvm m
LIB_DEPENDS = lber,ldap::databases/openldap
@ -75,6 +77,10 @@ CONFIGURE_ARGS += --with-mysql
MULTI_PACKAGES += -server
LIB_DEPENDS-server += pq::databases/postgresql,-main
CONFIGURE_ARGS += --with-pgsql
.elif ${BACKEND} == "sqlite3"
MULTI_PACKAGES += -server
LIB_DEPENDS-server += sqlite3.>=14::databases/sqlite3,-main
CONFIGURE_ARGS += --with-sqlite3
.elif ${BACKEND} == "no_server"
CONFIGURE_ARGS += --disable-server \
--disable-proxy

View File

@ -1,11 +1,16 @@
$OpenBSD: README.OpenBSD,v 1.6 2010/05/03 11:58:45 ajacoutot Exp $
$OpenBSD: README.OpenBSD,v 1.7 2010/05/04 05:51:22 ajacoutot Exp $
Using ZABBIX on OpenBSD
=======================
This document gives information relevant to using ZABBIX on OpenBSD.
The original documentation is available as a PDF file at
${HOMEPAGE}
(or via the -doc subpackage of the zabbix port) but may not be
redistributed.
A manual is available at:
http://www.zabbix.com/documentation/${MAJV}/complete
On OpenBSD, ZABBIX is packaged in four parts:
- the agent (in the zabbix-agent package) for installing onto a
@ -39,8 +44,8 @@ fi
For the proxy and the client, follow the same procedure, replacing
zabbix_server with zabbix_proxy or zabbix_clientd.
The Zabbix Server might fail due to lack of shared memory ("Can't
allocate shared memory..." errors), in which case you should set
The Zabbix Server or Proxy might fail due to lack of shared memory
("Can't allocate shared memory..." errors), in which case you should set
kern.shminfo.shmall to 32768 -- see sysctl(8) and sysctl.conf(5).
The web frontend works reasonably well with OpenBSD's chroot'ed
@ -96,6 +101,7 @@ ${TRUEPREFIX}/share/examples/zabbix:
$ cd ${TRUEPREFIX}/share/zabbix/schema
$ mysql -uzabbix -p[password] zabbix < mysql.sql
The following steps are not required for setting up a Zabbix Proxy.
$ cd ../data
$ mysql -uzabbix -p[password] zabbix < data.sql ## N.B. slow!!
$ mysql -uzabbix -p[password] zabbix < images_mysql.sql
@ -113,6 +119,22 @@ And initialize the database:
$ cd ${TRUEPREFIX}/share/zabbix/schema
$ cat postgresql.sql | psql -U zabbix zabbix
The following steps are not required for setting up a Zabbix Proxy.
$ cd ../data
$ cat data.sql | psql -U zabbix zabbix
$ cat images_pgsql.sql | psql -U zabbix zabbix
== SQLite3 ==
$ mkdir /var/db/zabbix
$ chown _zabbix /var/db/zabbix
The following steps are optional as Zabbix will automatically create
and initialize the database if it does not exist.
$ cd ${TRUEPREFIX}/share/zabbix/schema
$ cat sqlite.sql | sudo -u _zabbix sqlite3 /var/db/zabbix/zabbix.db
The following steps are not required for setting up a Zabbix Proxy.
$ cd ../data
$ cat data.sql | sudo -u _zabbix sqlite3 /var/db/zabbix/zabbix.db
$ cat images_sqlite3.sql | sudo -u _zabbix sqlite3 /var/db/zabbix/zabbix.db

View File

@ -4,3 +4,8 @@ network servers, devices and other IT resources. It supports distributed
and WEB monitoring, and more.
This package contains the ZABBIX server parts.
Available flavors:
mysql - build with support for MySQL
pgsql - build with support for PostgreSQL
sqlite3 - build with support for SQLite3

View File

@ -5,5 +5,6 @@ You should point this to the DocumentRoot of your web-server:
# ln -s ../zabbix /var/www/htdocs/zabbix
(make sure you use a relative symlink since Apache is chrooted)
zabbix-web frontend can use a PostgreSQL or MySQL database. Install the
php5-pgsql or php5-mysql package according to the one you wish to use.
zabbix-web frontend can use a PostgreSQL, MySQL or SQLite3 database.
Install the php5-pgsql, php5-mysql or php5-pdo_sqlite package according
to the one you wish to use.