InstallTikiMapserverGentoo
- Where are we?
- Where do we want to be?
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
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.phpyou 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
$ 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/map
Apache 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
- google maps...
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
Shoutbox
chibaguy
:
Pentrose, the shoutbox isn't really appropriate for support requests. Please post in the forum, with more details.
MEI_COLPOS
:
Hola a todos, en este espacio podrán dejar comentarios o preguntas rápidas que todos podrán eer. Es muy sencillo. Saludos,
Atte. Mariol
MEI_COLPOS
:
prueba!
Damian
:
Yo! How goes it Tiki people!???
