I'm a bit of a newbie but I'm trying to install an open-source web map service such as geoserver or mapserver. The easiest way it seems would be to use yum or rpm but can't do that because of lack of root access. I understand that means that I have to compile from source. However I am having great difficulty in doing that and would really appreciate some help! MapServer has "instructions" how to do so but there are so many dependencies that I keep getting stuck. Here's there instructions: http://mapserver.org/installation/unix.html I'm also confused about cmake. I installed cmake but don't know how to use it make the installation easier. GeoServer seems to want you to compile with Maven but I can't figure out how to install Maven and use it to compile GeoServer. http://docs.geoserver.org/latest/en/developer/maven-guide/index.html GeoServer and MapServer install so easily on Windows and I like them fine as an alternative to ArcGIS for Server. They just don't do me any good if I can't get them to work with webfaction. Thanks in advance! asked 20 Nov '13, 15:16 dbradmit |
I have successfully installed the mapserver WMS service on WebFaction. Like similar custom applications, mapserver must be installed from source. Then it can run on the local webhosting account as a "cgi application". But it's not too difficult. As you mentioned, the newest version of MapServer 6.4 uses the cmake compiler. I also found the usage of cmake very confusing and poorly documented. So I decided to install an older version: MapServer 6.2.2. I don't think there are any critically important features in 6.4 that are not in 6.2.2. Here are the commands that I did to make it work:
After completing the build from source, the $HOME/bin/mapserv executable file is created and mapserver has been installed. To make the mapserver WMS service running:
MAP SIZE 600 300 TRANSPARENT ON EXTENT 2820000 8600000 2880000 8650000 IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE agg OUTPUTFORMAT NAME agg DRIVER AGG/PNG IMAGEMODE RGB END # Legend LEGEND IMAGECOLOR 255 255 255 STATUS ON KEYSIZE 18 12 LABEL TYPE BITMAP SIZE MEDIUM COLOR 0 0 89 END END WEB IMAGEPATH "/home/keskari/tmp/" IMAGEURL "http://kala.hydrodata.org/tmp/" METADATA "wms_title" "My WMS Server" ##required "wms_onlineresource" "http://kala.hydrodata.org/mapserver.cgi?" ##required "wms_srs" "EPSG:3857" ##recommended "wms_enable_request" "*" ##necessary "wms_feature_info_mime_type" "text/html" END END # Web PROJECTION "init=epsg:3857" ##required END LAYER NAME "water_bodies" DUMP TRUE TEMPLATE "default.html" EXTENT 2840736.19 8603831.18 2877892.85 8637116.92 METADATA "wms_title" "water_bodies" "wms_include_items" "all" "gml_include_items" "all" "gml_geometries" "geom" "gml_geom_type" "polygon" END CONNECTIONTYPE postgis CONNECTION "host=localhost dbname=KALA user=KALA_admin password=****** port=5432" DATA "the_geom3857 FROM water_bodies" TYPE POLYGON STATUS ON CLASS STYLE COLOR 0 0 255 OUTLINECOLOR 0 0 0 SYMBOL 0 END END END END Finally, it is necessary to tell the mapserver.cgi executable which .map file to use. On a typical Apache Linux server, this is done by a SetEnv MS_MAPFILE=mapserver.map directive in the httpd.conf file but on WebFaction you can't edit httpd.conf but you can do the following workaround: First, I create an executable script called wrapper.cgi with the following content: #!/bin/sh export MS_MAPFILE=/home/keskari/config/mapserver.map Then I create a file called .htaccess in my mapserver_app with the following content: RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !wrapper.cgi RewriteRule ^.*.cgi /wrapper.cgi Now my WMS hosted on WebFaction is running: http://kala.hydrodata.org/mapserver.cgi?service=WMS&request=GetCapabilities The following documents helped me to successfully install the MapServer WMS:
I hope my experience can help somebody who is stuck with installing mapserver on WebFaction. answered 28 Jan '14, 22:23 jirik Thanks for sharing!
(28 Jan '14, 22:26)
seanf
|
When I try the ./configure command I get an error saying: ./confugure no such directory exists... please help -Shawn answered 23 Aug '14, 21:06 w7071016 |
The best place to start would be looking at our guide for installing from source: http://docs.webfaction.com/software/home-install.html#installing-software-from-source
If you encounter issues at any point in that process then you can either post about it here, or feel free to log a support ticket from your WebFaction control panel.