Remote Gnu Database Manager 2.1.41

Remote Gnu Database Manager is a network server daemon and client library for the standard GNU GDBM(3) database management...
Remote Gnu Database Manager is a network server daemon and client library for the standard GNU GDBM(3) database management interface, which itself incorporates Berkeley DBM.

To setup after installation (these notes are for 2.1.33 or later), let make install do what it can, and then:

1. create a user, gdbm, on the server machine with home in /var/lib/gdbm. Make install tries to do that for you using adduser so you likely just have to check /etc/passwd and /etc/group.
2. Create /var/lib/gdbm and change owner to gdbm. Again, make install has a stab at this for you and likely you will need to do nothing yourself.
3. Also create /var/lib/gdbm/data, /var/lib/gdbm/ctrl and change owner to gdbm. Make install should also have made those.
4. Copy those parts of /etc/passwd belonging to users who should be able to access the daemon to /var/lib/gdbm/ctrl/passwd. This is entirely in your hands.
5. Likewise for /etc/group to /var/lib/gdbm/ctrl/group.
6. Start the daemon as gdbm with some command like "sudo -u gdbm /usr/sbin/gdbmd", or "su -c /usr/sbin/gdbmd gdbm". The install will not start it for you, nor does it presently install a system startup script for it in /etc/init.d or elsewhere.
7. Write an application on the client that uses the standard gdbm_* calls in the GNU GDBM(3) manpage, but replace the gdbm_ calls with rgdbm_ calls. The install routine does do that ... or perhaps I lie.

That's about it! Apart from setting up for SSL if you want to use that and I'll give some further indications as to how to do that below.

One has to add two extra calls in the application over and above what was there already for gdbm(3) usage; one to rgdbm_connect() and another to rgdbm_disconnect(), respectively to begin and end the session, as detailed in the rgdbm(3) man page.

Example:

Sample code ... start by making the connection:

rgdbm_connect(host, dir, user, 0);

Then open the desired database in that directory:

GDBM_FILE dbf = rgdbm_open(dbname, 1024, GDBM_WRCREAT, 0640, NULL);

Now the rgdbm(3) ops are available.
fprintf(stdout, "Database contains ...n");
datum key = rgdbm_firstkey(dbf);
if (key.dptr) {
datum content = rgdbm_fetch(dbf, key);
fprintf(stdout, "key %s content %sn", key.dptr, content.dptr);
while (key = rgdbm_nextkey(dbf, key), key.dptr) {
fprintf(stdout, "key %s content %sn", key.dptr, content.dptr);
}
}

Terminate by closing:
rgdbm_close(dbf);
and disconnect from the session:
rgdbm_disconnect();

What's New in This Release:

Added (generated) debian directory to package.

last updated on:
June 26th, 2007, 11:35 GMT
price:
FREE!
homepage:
rgdbm.sourceforge.net
license type:
GPL (GNU General Public License) 
developed by:
Peter T. Breuer
category:
ROOT \ Database \ Database APIs
Remote Gnu Database Manager
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT