# Zabbix with sqlite3: creating the database

## Anuit

I am trying out zabbix.  The install gives me the message  

```
 * You need to configure your database for Zabbix.

 * 

 * Have a look at /usr/share/zabbix/database for

 * database creation and upgrades.

```

Now I take a look in the directory and there appears to be a spiffy create/Makefile to help me, but just trying to run it gives

```
create # make

cd .. && make  am--refresh

make[1]: Entering directory `/usr/share/zabbix/database'

make[1]: *** No rule to make target `am--refresh'.  Stop.

make[1]: Leaving directory `/usr/share/zabbix/database'

make: *** [../aclocal.m4] Error 2

```

Well maybe I don't use this Makefile.  So I just did

```
database # cat create/schema/sqlite.sql | sqlite3 zabbix.db

database # ls -l /usr/share/zabbix/database/zabbix.db

-rw-r--r-- 1 root root 340992 Aug 18 19:43 /usr/share/zabbix/database/zabbix.db
```

I edit /etc/zabbix/zabbix_server.conf and change DBName to /usr/share/zabbix/database/zabbix.db

I then run 

```
database # zabbix_server -n 1

zabbix_server [714]: php_sysvsem_semop: failed to acquire semaphore (id 0): Invalid argument

zabbix_server [714]: ERROR: ERROR: Unable to create lock on SQLite database.

```

I guessing there was something important back at the Makefile stage. All other install helps talk about mysql and none of them mention this Makefile.  Can someone point the way?

----------

## redagadir

what user are you running zabbix with?

http://www.zabbix.com/documentation/1.8/manual/installation (check the ./configure+make and the db creation sections)

----------

