Changes

From Amahi Wiki
Jump to: navigation, search
2,052 bytes added ,  03:36, 28 August 2009
m
more to come.. saving interim notes
=== 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: ScriptAlias /cgi-bin /var/hda/web-apps/mapserver/cgi-bin Alias /tmp /var/hda/web-apps/mapserver/tmp <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: cd /var/hda/web-apps/mapserver mkdir tmp chown -r apache.apache tmp 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
180

edits