Changes

From Amahi Wiki
Jump to: navigation, search
2,452 bytes added ,  16:41, 28 August 2009
no edit summary
'''INCOMPLETE... work in progress'''
------
== Intro ==
MapServer is a web-based mapping platform, power many large enterprise mapping requirements. It runs as a CGI or through its various API hooks in Python, PHP, Ruby and more. A simple configuration file defines how your spatial data will be accessed and rendered. A basic web templating system is also included for easy testing through basic HTML.
=== Packages ===
Install MapServer package using the ''yum'' installer, also include the proj library support files (epsg)and some basic fonts for playing with: yum install mapserver epsgbistream-vera-fonts
The process discovers about 12 other packages that fulfill its dependencies. Overall install takes about 16MB of space. Here's a list of the other packages it installs.
=== Files ===
The ''rpm -ql mapserver'' command will list all the installed files from the MapServer package. The main executable is located at:
/usr/sbin/mapserv And test files from: /usr/share/doc/mapserver-5.2.2/tests Are set up automatically by the HDA installer, into the MapServer Amahi web app: /var/hda/web-apps/mapserver/html/test These don't do anything with the web interface at all yet, though from the command line you can test that MapServer is installed okay by doing the following: cd /var/hda/web-apps/mapserver/html/tests shp2img -m test.map -o testoutput.png Then you should be able to view the output through your Amahi MapServer service at: http://mapserver/tests/testoutput.png It ain't pretty, but is a simple test the developers use.  == Server Setup ==As part of the installation the mapserv CGI file will get put in its own folder for Amahi and the httpd conf.d file is edited to allow the CGI to be executed.  mkdir /var/hda/web-apps/mapserver/cgi-bin cp /usr/sbin/mapserv /var/hda/web-apps/mapserver/cgi-bin chown -R apache.apache /var/hda/web-apps/mapserver/cgi-bin This section is added to the middle of the file /etc/httpd/conf.d/1026-mapserver.conf: Alias /tmp /var/hda/web-apps/mapserver/tmp Alias /etc /var/hda/web-apps/mapserver/etc ScriptAlias /cgi-bin /var/hda/web-apps/mapserver/cgi-bin <Directory "/var/hda/web-apps/mapserver/cgi-bin"> Options +ExecCGI </Directory> After this, running ''/etc/init.d/httpd reload'' may be necessary if you are doing it manually. Now you should be able to test that the mapserv CGI executes by going to:http://mapserver/cgi-bin/mapserver. The response should be: No query information to decode. QUERY_STRING is set, but empty. Also we create a temporary folder for holding our map images and a folder for common settings files: cd /var/hda/web-apps/mapserver mkdir tmp etc cp -r /usr/share/doc/mapserver-5.2.2/fonts etc cp -r /usr/share/doc/mapserver-5.2.2/symbols etc cp -r /usr/share/doc/mapserver-5.2.2/tests/symbols.txt etc/symbols chown -R apache.apache tmp etc  Now, onto more useful stuff, building a sample application. == A Sample Application ==The package will install a demo application based on the Global Mapping project mentioned in [http://webmappingillustrated.com Web Mapping Illustrated] by Tyler Mitchell. :-)  cd /var/hda/web-apps/mapserver/html wget http://spatialguru.com/maps/apps/global.tar.gz  '''.... more to come...'''
180

edits