Tag Archives: geoserver

Geoserver notes

This post is mainly for my notes. On a clean install of Ubuntu 14.04 server I went through the following.

1) Java

sudo apt-get update 

Then, check if Java is already installed:

java -version 

If it returns “The program java can be found in the following packages”, Java hasn’t been installed yet, so execute the following to install the standard runtime environment:

sudo apt-get install default-jre 

2) Geoserver

These installation notes are based on those found on the Geoserver website.

  • Select the Stable version of GeoServer to download.

Select Platform Independent Binary on the download page.

  • Download the archive and unpack to the directory where you would like the program to be located (assumed to be /usr/local/geoserver for these notes).
wget http://sourceforge.net/projects/geoserver/files/GeoServer/2.7.0/geoserver-2.7.0-bin.zip
sudo mv ~/geoserver-2.7.0-bin.zip .
sudo unzip geoserver-2.7.0-bin.zip
  • Add an environment variable to save the location of GeoServer by typing the following command:
echo "export GEOSERVER_HOME=/usr/local/geoserver" >> ~/.profile
. ~/.profile
  • Make yourself the owner of the geoserver folder using the following command replacing USER_NAME with your own username :
sudo chown -R USER_NAME /usr/local/geoserver/
  • Start GeoServer by changing into the directory geoserver/bin and executing the startup.shscript:
cd geoserver/bin
sh startup.sh

If you see the GeoServer logo, then GeoServer is successfully installed. If you get a message about Java then it may be that you need to run the following:

echo "export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.07" >> ~/.profile
. ~/.profile
Advertisements
Tagged , ,

Notes on PostGIS and Geoserver

This is a post to remind me of some of the things that I did to get a VM set up with a vanilla install of PostGIS and Geoserver. More will be posted once I get the extensions up and working and data into the system.

The first thing to do is get your OS set up and running nicely inside of VirtualBox or whatever VM software you use. I have been trying out a few lightweight Linux distributions recently including Lubuntu and Elementary OS. I just keep on coming back to WattOS though which is, in my opinion, one of the best lightweight distributions around. It is stable, looks clean, has a wide range of software available and for the purposes of what I am looking to do, has an intuitive GUI. I used the 32-bit WattOS 7 distribution and installed the Linux VBAdditions into the VM.

PostGIS

Then from inside the running virtual distribution you need to download the http://www.enterprisedb.com install file for PostgreSQL. If it needs unzipping then do so. You should end up with a filename.run file. Change the permissions to 777 or use the following command:

sudo +x filename.run

Then run the file:

sudo ./filename.run

Accept the default locations (/opt/PostgreSQL/9.3/data), set up the password that you want for the server, accept the port number (5432) and then launch the StackBuilder when prompted. All of these values can be changed depending on the type of installation that you are looking to do. In the StackBuilder choose Spatial Extensions > PostGIS 2.1 for PostgreSQL9.3 v2.1. Allow the installer to download and install what it needs to (you’ll need to enter your PostgreSQL password to verify the install). The WattOS menu should then contain an entry for PostgreSQL that includes pgAdminIII, StackBuilder and documentation.

Geoserver

I went through a whole load of faff trying to get a working install of Geoserver running until I decided to read the manual and saw that there was what looked like a painless way to do it. So I did it, and it was simples.

Download the relevant Web Archive file (http://geoserver.org/display/GEOS/Download) and extract it. Install tomcat:

sudo apt-get install tomcat7

Copy the WAR file into the relevant directory and it all just works:

sudo cp geoserver.war /var/lib/tomcat7/webapps

 

 

Tagged , , , ,

Geoserver install

So that I remember, should I ever need to do this again:

1) download the binary files from the geoserver website – geoserver.org/display/GEOS/Latest You want the ones that are labeled Binary (OS independent)

2) unzip the file (in this case version 2.4, RC1)

unzip geoserver-2.4-RC1-bin.zip

3) change directory into the binary directory of the unzipped file

cd geoserver-2.4-RC1/bin

4) run the startup script

./startup.sh

5) if there is a Java error then chech which version you have installed using

which java

if nothing is installed then use

sudo apt-get-install openjdk-7-jdk

check where it is installed using the ‘which’ command again and then set the JAVA_HOME variable

export JAVA_HOME=/usr

exit the terminal and start a new one. Navigate back to the bin directory of the geoserver extracted file

6) run geoserver

./startup.sh

7) When the command line output halts and you see ‘Started SelectChannelConnection’ then goto a local browser and type

localhost:8080

choose the second option to start the geoserver admin panel and login with the default details user=admin, passwd=geoserver

Tagged , ,