Installing the GeoServer Mapping Server on AWS/EC2
This category of posts was kicked off with a brief discussion of open source mapping server software, and this post continues the effort with the installation of GeoServer on an AWS instance of EC2 running Linux. As mentioned previously, the work is being guided by Lesson 7 in Dr. Ian Turnton’s Open Web Mapping course.
Part 4 of the lesson discusses tracking down information which will be the basis of the map. For this particular exercise, the California Spatial Information Library (CaSIL) was chosen as the data source, and in particular, county boundaries, which were found in ARB_basins_districts_counties.zip. This was downloaded and unzipped, and it turned out to contain not only the country boundaries, but also air basins and air districts. Who knew.
As recommend by Dr. Turton, uDig was downloaded from my new best friends at Refractions Research. uDig is a freely downloadable desktop application for the data access, editing, and viewing of GIS data. Installation was effortless and quick, and within a couple of minutes I had loaded the California map data, as shown in the first screenshot. Total time required, not included waiting for downloads — 30 minutes, tops*.
Part 6 continues with the installation of the map server software. Give the target for the installation is a Linux instance, and Dr. Turton’s instructions seem to refer to a Windows installation, I decided to flip over to GeoServer.org, and follow their installation instructions for Linux. To start, Setting Up Solr on EC2, Part I was used as a guide for setting up the EC2 instance. When it came to the installation of the JDK, it strongly advised to install the Sun JDK, so that was obtained from their download site. There were a number of different packaging options, but the one chosen was the plain old JDK 6 Update 16. It was downloaded and installed according to the RPM installation instructions provided by Sun. That went well, with just one minor hitch; there was nothing in the installation to set the JAVA_HOME variable, so that had to be set manually using JAVA_HOME=”/usr/java/default” followed by export JAVA_HOME. A more permanent solution will be incorporated into the final configuration of the server.
GeoServer 1.7.7 was then downloaded and installed according to the instructions provided. It’s really a misnomer to call it ‘installation’; there are actually only of commands that have to be run after the software has been copied onto the target platform. This seems to be typical for a pure Java product. The only other task was to open up port 8080 on the EC2 instance. Oh yes, and instead of using the localhost URL shown in the instructions, it was necessary to provide the public DNS name of the EC2 instance. But with those matters in hand, the welcome screen fired right up, as shown to the left.
To round out the installation, the first few steps of the Web Administration Interface Quickstart were followed. In particular the Map Preview section was used to generate some sample maps off the server, and without any difficulty, maps implemented with OpenLayers were displayed (see last screenshot) , along with KML, PDF and SVG formats.
The final exercise was the copy the JDK and GeoServer downloads to an EBS volume, so they would not have to be re-uploaded when the installation work continues.
Code Shavings Thanks to R. Bucky on the Ubuntu forums for help with the JAVA_HOME problem described above. ♦ Downloading GeoServer 1.7.7 turned out to be somewhat poor timing. Version 2.0.0 became the stable release on 2009-10-23, the day after I did the initial installation.
*When I think about the treasure trove of free GIS data out there coupled with free software like uDig, I’m once again reminded of my favourite George Constanza quote; “Are you crazy? This is like discovering plutonium…by accident!”
Posted on 23rd October 2009
Under: Blanco, Developers' Journal | 1 Comment »
