[mapserver-users] Mapcache: error with Berkeley DB and display tiles

samuelmesa at gmail.com samuelmesa at gmail.com
Tue Jan 28 18:09:57 PST 2014


Andreas, thank you very much for your time in the instructions,now the
display of tiles worked properly for Berkeley databases. I have followed
the instructions for the Apache  Server. However, I'm using Nginx and
change the permissions of the Group and user as follows:

sudo chown nginx:nginx /tmp/foo & sudo chmod - Rfv g+rwx /tmp/foo

Again many thanks for your help.

I have checked all types of caches, and seems to work faster with Berkeley
databases.

regards,

Samuel Mesa.


2014-01-28 Eichner, Andreas - SID-NLKM <Andreas.Eichner at sid.sachsen.de>

> > Andreas, thanks for the explanation about the Berkeley Database.
> > However, I have made several changes of permissions and owner of the
> > files produced by mapcache_seed, and I still get the same error on
> > the OpenLayers demo.
> >
> > I don't know if others users have had the same error with Mapcache
> > and Berkeley Databases in Ubuntu Server.
> >
>
> Have you build mapcache yourself or do you use a prebuild one? Today I
> build mapcache with BerkeleyDB support on a Debian Testing box. Basically,
> this is what I did:
>
> * check out latest master
> * apt-get install libdb5.1-dev
> * follow the install instructions in INSTALL, add -DWITH_BERKELEY_DB=ON to
> "cmake .." and make sure "* Berkeley DB: /usr/lib/..." is listed under
> "Optional components"
> * add the following config element to mapcache.xml if it does not exist
> yet:
>    <cache name="bdb" type="bdb">
>       <!-- base (required)
>          absolute filesystem path where the berkeley db database file is
> to be stored.
>          this directory must exist, and be writable
>       -->
>       <base>/tmp/foo/</base>
>       <!-- key_template (optional)
>          string template used to create the key for a tile entry in the
> database.
>          defaults to the value below. you should include {tileset}, {grid}
> and {dim} here
>          unless you know what you are doing, or you will end up with mixed
> tiles
>       <key_template>{tileset}-{grid}-{dim}-{z}-{y}-{x}.{ext}</key_template>
>       -->
>    </cache>
> * create the base directory and grant access to web server:
>   # mkdir /tmp/foo && chgrp www-data /tmp/foo && chmod g+rwx /tmp/foo
> * set the <cache> element to "bdb" in a tileset
> * populate the cache by seeding a tileset that uses a bdb-cache
> * the base should look something like this:
> # ls -l /tmp/foo/
> insgesamt 11528
> -rw-r--r-- 1 www-data www-data 9764864 Jan 28 13:30 bdb.db
> -rw-r----- 1 www-data www-data   24576 Jan 28 13:35 __db.001
> -rw-r----- 1 www-data www-data  253952 Jan 28 13:35 __db.002
> -rw-r----- 1 www-data www-data 1318912 Jan 28 13:35 __db.003
> -rw-r----- 1 www-data www-data  811008 Jan 28 13:35 __db.004
>
> * to verify this worked use the strings command on the bdb.db and grep for
> the tileset name: # strings /tmp/foo/bdb.db|grep MyTilesetName
> * use the demo service to check if it is working
>
>
>


-- 
---
    .~.
   / v \
  //    \\
 /(      )\
   ^`~'^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140128/1cdee556/attachment.html>


More information about the mapserver-users mailing list