Installing Geoserver on Mac OS X

I use mac for most of my development purpose, and it’s already lil scary trying to install executables and libraries which are already available in .exe for windows but no .dmg for mac 😭 Geoserver is one of the tools that I use all the time, until version. 2.12 geoserver shipped with .dmg to install it! Easy pisy !! 😁 But after 2.12 it switched to platform independent binary which is lil bit tricky to install. But don’t worry!!😉 In this blog you’ll find all pieces needed to run geoserver’s latest stable release successfully. Let’s get started!!

Step 1 : Downloading JAVA JRE 8

Geoserver works on JAVA environment (more specifically JRE 8 *not latest one) , you can grab your copy here . The procedure to install it is straight forward. Check whether JAVA is installed by not as follows:
  1. Open system preferences and see if you have JAVA icon there*JpHlemETiW6hz7LR2hVsdA@2x.jpeg
  1. Open terminal and type > Java -version*qH0onHy7XLY011VUMXYJmw.png If you get something like this, you are golden. If you get something like this*4se451ggqeX0PmJqeXALTA.png Click on More Info and download the JDK Java and install it. Once done, again check the java -version

Step 2: Download copy of geoserver stable platform independent binary

It is suggested to use stable copy all the time because it is always tested and chances of getting bugs will be lesser. You can grab your copy here . This will download a zip which you have to extract.

Step 3: Setting up geoserver

Setting up geoserver is a two part process, one is putting geoserver in expected directory and second is setting up environment variables.

Step 3.1 Putting geoserver in directory*ZjbKg70cZM-rXwz-DQCeew.png Open the new finder window, click on go tab from top and select “Go to Folder” and type “usr/local”.*lz54XPw1iv6i8ve4eZwMkQ.png Put the extracted geoserver folder in the local directory

Step 3.2 Setting up geoserver and environment variables

Once folder is pasted , type following command in terminal window >
 export GEOSERVER_HOME=/usr/local/geoserver
this will set the GEOSERVER_HOME environment variable. Once the variable is set, next is to make sure the current user is the owner of the folder. To find your current username if you are not sure, checkout this post. >
sudo chown -R krishna /usr/local/geoserver-2.1.0/
Replace krishna with whatever is your username.

Step 4: Starting geoserver

Once you follow everything to the point till step 3, you will be able to access geoserver every time as follows :

Step 4.1 Open geoserver directory:

Open the Finder -> Go -> Go to Folder and type “usr/local” and open the geoserver folder and open the bin folder inside the geoserver directory

Step 4.2 Open bin directory in terminal:

Open new terminal window and type cd and then drag bin folder to get the path alternative way to get the path is to right click on bin directory and clicking the option button from keyboard to copy the path.*oXEVzt6PrLYvtnVvtzVBuw.png

Step 4.3: Staring geoserver in terminal:

Once you are inside bin folder , type sh , this will use the file inside bin folder to start the geoserver*nO2PRQsUFg-t0DsMw8ZkNA.gif after running the command, geoserver will spin up , once you see started , it means the geoserver is working fine and can be access at > http://localhost:8080/geoserver/web*svZiNhYcyw75wkpaeUYDHA.png

Leave a Reply

Your email address will not be published. Required fields are marked *