InstallTikiMapserverGentoo
- Where are we?
This is a development log for others to try and work on, its not a description of a production stable environment yet. Please feel free to further enhance this howto on installing MapServer on GentooLinux, configuring the setup especially for use wih TikiMaps feature, like the one in use here on tw.org's CommunityWorldMap.
- Where do we want to be?
Use Mapserver with Tikiwiki.
We are supposing you got Tikiwiki already installed and running under Apache, Mysql and Php (using latest dev-lang/php layout).
Please also read as reference http://doc.tikiwiki.org/Maps+Install.
Gentoo bugzilla list one open entry for a search on mapserver, its http://bugs.gentoo.org/show_bug.cgi?id=69417
. There is an ebuild for Mapserver 4.6.1, lets use that with portage overlay feature.
Portage Overlay details can be found in the gentoo wiki:
$ echo "sci-libs/gdal geos" >> /etc/portage/package.use $ emerge gdal $ emerge '=dev-lang/php' $ mkdir /usr/local/portage/net-www/mapserver -p $ cd /usr/local/portage/net-www/mapserver $ wget -O mapserver-4.6.1.ebuild http://bugs.gentoo.org/attachment.cgi?id=70931 $ echo "net-www/mapserver php proj gdal geos" >> /etc/portage/package.use $ emerge mapserver $ ebuild ./mapserver-4.6.1.ebuild digest $ emerge mapserver
now there should be a php_mapscript.so php extension in /usr/lib/php(4,5)/lib/php/extensions/no-debug-non-zts-20041030
test using a special phpinfo php:
echo "<? \
dl('php_mapscript.so'); \
phpinfo(); \
?>" >> /var/www/phpinfo.php
you should have a MapScript? part up until now, lets configure for easy tikwiki setup
setup php.ini, add to the file
extension=php_mapscript.so
create maps dirs
$ mkdir /var/www/html/map $ mkdir /var/www/html/map/data $ mkdir /var/www/html/map/fonts $ mkdir /var/www/html/map/graphics $ mkdir /var/www/html/map/images
use map from doc.tikwiki.org tutorial to get started, maybe worldmap will be provided later on... go on to: http://doc.tikiwiki.org/Maps+Mapfile+Tutorial ...
or download the tikiwiki mapdata
and extract it to /var/www/html/map (see README and Install)
$ cd /var/www/html/map $ tar -xjf tikiwiki-mapdata-0.1.tar.bz2 $ mv ./tikiwiki-mapdata-0.1/* ./ $ rm -fr ./tikiwiki-mapdata-0.1/
lets give apache all rights, be careful on prod so install vhosts.conf described later.
$ chown -R apache /var/www/html/mapApache user must be able to modify mapfiles and able to save layers file, but httpd must not be allowed to download or run them directly or you have a security risk. Too easy to upload a .php file and then make it run....
link /map to tikiwiki root (to serve stuff from under tiki)
$ ln -s <yourtikiroot>/map /var/www/html/map
edit /etc/apache/vhosts.d/vhosts.conf (should be Included in httpd.conf), or you could add this to tikiroot/.htaccess
#protect mapserver against downloads
<Directory /var/www/html/map>
AllowOverride All
Options -Indexes FollowSymLinks MultiViews
<IfModule mod_access.c>
Order allow,deny
Deny from all
</IfModule>
</Directory>
<Directory /var/www/html/map/images>
AllowOverride All
Options -Indexes FollowSymLinks MultiViews
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
<Directory /var/www/html/map/graphics>
AllowOverride All
Options -Indexes FollowSymLinks MultiViews
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
restart apache
$ /etc/init.d/apache stop $ /etc/init.d/apache start
now configure Tikiwiki to use /var/www/html/map as maps root: go to your tiki site's admin, and now setup the necessary stuff there:
- goto admin/features turn on Maps
- goto admin/Maps and set the proper directory for maps
- set the default map to world.map (if you have extracted the tikiwiki-mapdata tarball)
open tiki-map.phtml see what happens ;)
see Navigating Maps Tutorial on docs for more
clean out the temporary images once in a while:
use something like tmpreaper or tmpwatch to clean /var/www/html/map/images add to /etc/cron.hourly/:
$ /usr/sbin/tmpwatch -f 2 /var/www/html/map/images/
for more see http://doc.tikiwiki.org/tiki-index.php?page=Maps%20Install
and http://mapserver.gis.umn.edu/doc/mapfile-reference.html
for more specs
- google maps...
add more...
Where ideas can be exchanged, debated, etc. Interested people can subscribe to the wiki page and/or to these forums as they would a mailing list.
- http://doc.tikiwiki.org/tiki-index.php?page=Maps+Mapfile+Tutorial&bl
- http://doc.tikiwiki.org/tiki-index.php?page=Maps%20Admin
- http://tikiwiki.org/tiki-read_article.php?articleId=112&highlight=mapserver
- http://tikiwiki.org/tiki-read_article.php?articleId=84&highlight=mapserver
- http://tikiwiki.org/tiki-read_article.php?articleId=64&highlight=mapserver
Contributors to this page: Franck
,
Damian
and
ang
.
Page last modified on Friday 28 October 2005 00:58:44 CEST by Franck
.
Sidebar
Sidebar
Search by Page Name
Shoutbox
TikiTweets
- TikiWiki: Tiki Receives Best of Open Source Software Applications Award http://bit.ly/bXs2tY #TikiWiki
- TikiWiki: TikiFest New York: Countdown to Tiki 6 http://bit.ly/9qMf1i #TikiWiki
- TikiWiki: BigBlueButton and Multilingual Improvements Emerge from TikiFest Ottawa http://bit.ly/9krNJl #TikiWiki
- TikiWiki: Calling All Translators! http://bit.ly/bn7XkY #TikiWiki
- TikiWiki: Nominate Tiki for the Packt 2010 Open Source Awards http://bit.ly/bbbAw9 #TikiWiki
- TikiWiki: You're Invitated to the TikiFest / BigBlueButton Wine and Cheese Event http://bit.ly/c84PfM #TikiWiki
- TikiWiki: Tiki 5.1 Now Available http://bit.ly/dsu70R #TikiWiki
- TikiWiki: Tiki 5.1 RC1 Now Available http://bit.ly/bcaSI2 #TikiWiki
- TikiWiki: TikiFest Barcelona Wraps Up With Great Progress http://bit.ly/cPN9B1 #TikiWiki
- TikiWiki: Tiki Community Releases First Video Interview http://bit.ly/d7Yheg #TikiWiki

