@@ -8,212 +8,8 @@ cd mapcache
88mkdir build
99cd build
1010cmake ..
11- # follow instructions below if missing a dependency
1211make
1312sudo make install
1413
15- The installation script takes care of putting the built module in the apache module directory.
16- The process for activating a module is usually distro specific, but can be resumed by the
17- following snippet that should be present in the apache configuration file(s):
18-
19- LoadModule mapcache_module modules/mod_mapcache.so
20-
21- Next, a mapcache configuration is mapped to the server url with the following snippet
22-
23- <IfModule mapcache_module>
24- <Directory /path/to/directory>
25- Order Allow,Deny
26- Allow from all
27- </Directory>
28- MapCacheAlias /mapcache "/path/to/directory/mapcache.xml"
29- </IfModule>
30-
31- Before you restart, copy the example mapcache.xml file to where you want it:
32-
33- cp mapcache.xml /path/to/directory/mapcache.xml
34-
35- (as root)
36- # apachectl restart
37-
38- If you have not disabled the demo service, you should now have access to it on
39- http://myserver/mapcache/demo
40-
41-
42- Customizing the build, or if something went wrong
43- -------------------------------------------------
44-
45- mod_mapcache requires apache, libcurl, libjpeg and libpng development headers.
46- The cmake script will try to locate them in default system locations, that can be
47- overriden or specified with -D switches. For example, if you don't want fcgi and
48- you get a message such as 'Could NOT find APR ', you can use a command such as:
49- (assuming that apr is at /usr/local/apr)
50-
51- cmake -DWITH_FCGI=0 -DCMAKE_PREFIX_PATH="/usr/local/apr;" ..
52-
53-
54-
55- apache apxs
56- ===========
57-
58- --with-apxs=/path/to/apxs
59-
60- apxs is the apache extension tool that is used for building and installing the module to a local
61- apache instance. it should be installed along with a standard apache build, or supplied by
62- distros when installing the apache development packages.
63- apxs is sometimes called apxs2 (notably on debian).
64- On Ubuntu, apt-get install apache2-prefork-dev might help
65-
66- apr
67- ===
68-
69- --with-apr-config=/path/to/apr-config
70-
71- apr-config is sometimes called apr-1-config on some systems. The path to the apr libraries is susually determined
72- from the previous apxs utility. you can use this switch to override which apr will be used. beware that using a different
73- version of apr than the one that is linked to by apache will likely cause bugs.
74-
75- apr-util
76- ========
77-
78- --with-apu-config=/path/to/apu-config
79-
80- apu-config is sometimes called apu-1-config. the apr-util library is used to enable the memcached cache backend for
81- stroing tiles. If you don't plan on using it you can safely ignore or disable it.
82-
83- libcurl
84- =======
85-
86- --with-curl-config=/path/to/curl-config
87-
88- libpng
89- ======
90-
91- --with-png=/path/to/png/prefix
92-
93- this is the path where the libpng headers and libs can be located.
94- the configure script will be looking for [path]/include/png.h and [path]/lib/libpng.so
95-
96- libjpeg
97- ======
98-
99- --with-jpeg=/path/to/jpeg/prefix
100-
101- this is the path where the libjpeg headers and libs can be located.
102- the configure script will be looking for [path]/include/jpeg.h and [path]/lib/libjpeg.so
103-
104- pixman (from 0.5 onwards) (recommended)
105- =======================================
106-
107- --with-pixman=[yes|no|/path/to/pkgconfig/pixman.pc]
108-
109- pixman is a pixel manipulation library used to assemble image tiles when responding
110- to non-tiled wms requests. Pixman support is recommended as it is highly optimized
111- and will take advantage of recent processor extensions (mms, sse, ...) to speed up
112- blending and resampling operations. In case the pixman library is not found, mod-mapcache
113- will fall back to internal pixel operations that are slower.
114-
115- sqlite (from 0.5 onwards) (optional)
116- ====================================
117-
118- --with-sqlite[=/path/to/sqlite/prefix]
119-
120- sqlite is used to enable the sqlite and mbtiles cache backend. version 3.5.0 or newer is
121- required.
122-
123-
124- gdal (from 0.4 onwards) (optional)
125- ===================================
126-
127- --with-gdal=/path/to/gdal-config
128-
129- gdal (actually ogr) is used by the seeding utility to allow the seeding of tiles only intersecting a given polygon, e.g.
130- to preseed all the tiles of a given country.
131-
132- geos (from 0.5 onwards) (optional)
133- ===================================
134-
135- --with-geos=/path/to/geos-config
136-
137- along with gdal/ogr, geos is needed by the seeder to test for the intersection of tiles with geographical features.
138-
139- pcre (optional)
140- ===============
141-
142- --with-pcre=/path/to/pcre/prefix
143-
144- pcre (perl compatible regular expressions) can be used instead of posix regular expressions for validating WMS dimensions.
145- they are more powerfull than posix REs (and might be slower). you don't need this if you aren't planning on using WMS
146- dimension support with regex validation, or if your validation needs are covered by posix REs.
147-
148- fastcgi support (optional)
149- ==========================
150-
151- mod-mapcache can run as a fastcgi executable. Note that the overhead of fastcgi is non-negligeable with respect to
152- the throughput you may obtain with a native apache module. Note that the fastcgi build is less tested, and may lag behind
153- compared to the apache module version on some minor details (most notably on error reporting, and cache-control header
154- generation).
155-
156- --with-fastcgi=/path/to/fastcgi/prefix
157-
158- give the location of the fastcgi libraries and headers.
159-
160- Experimental options, use at your own risk
161- ------------------------------------------
162-
163- debug
164- =====
165-
166- --enable-debug
167-
168- enables some extra tests inside the code, and prints out many more debugging messages to the server logs. you should
169- probably not enable this unless you want to track down a problem happening inside mod-mapcache.
170-
171- file locking
172- ============
173-
174- --with-lock-mechanism=file|semaphore
175-
176- mod-mapcache needs to keep a cross-process and cross-thread lock on tiles so that requests for tiles of a same metatile
177- don't end up becoming multiple requests for the same metatile on the wms server. The default mechanism "file" is highly
178- recommended unless you know what you are doing.
179-
180- This can be configured in two different ways in mod-mapcache, each with their advantage and inconvenience:
181-
182- * file : mod-mapcache will use a file to signal other rendering threads that the given metatile is being rendered by the
183- wms source. (the location of these files is configurable with the <lock_dir> configuration directive). In the case of
184- threaded mpm, this has the inconvenience that we cannot be signaled by the operating system that this file has been
185- deleted, and thus must resort to sleeping every .5 sec and checking if the file still exists until the file is deleted.
186- This isn't very efficient, but should not be problematic in practice as this loop only happens if the tile wasn't
187- already in the cache, i.e. at most once per tile for the whole lifetime of the cache.
188-
189- * semaphore : mod-mapcache can use posix semaphores for waiting on tile rendering. This method has the inconvenience
190- that if a rendering thread crashes (or more likely is killed by the system administrator while waiting for the wms
191- source to finish rendering), the semaphore lives on in the operating system and will prevent all accesses to the
192- tile until the sempahore is manually deleted. As apache threads are locked while waiting for this semaphore that
193- will never be released, you might end up with loads of idle processes stacking up. (stuck semaphores on linux can
194- be discarded by deleteing the files of the form sem.x-x-x-gridname-tilesetname(...) that are located in /dev/shm/.
195- The "file" maechanism does not have this limitation, as stale lockfiles can be deleted upon server restart.
196-
197-
198- enabling mod_mapcache on Ubuntu
199- ===============================
200-
201- Ubuntu has it's own method of invoking modules, using a 'load' file.
202- The conf files should be created in /etc/apache2/mods-available/, ie
203-
204- echo 'LoadModule mapcache_module /usr/lib/apache2/modules/mod_mapcache.so' > /etc/apache2/mods-available/mapcache.load
205-
206- and then enable it: a2enmod mapcache
207-
208- However, before you restart apache, you will need to make the lib (which is in
209- /usr/local/lib) available, maybe by:
210-
211- ln -s /usr/local/lib/libmapcache.so /usr/lib/libmapcache.so
212-
213-
214-
215-
216-
217- Win32 compilation instructions
218- ------------------------------
219- TODO
14+ Detailed instructions and configuration options are maintained in the mapcache documentation :
15+ http://mapserver.org/mapcache/install.html
0 commit comments