Installing Geoserver (Binary) in windows

I was recently trying to install geoserver 2.17.0 on a windows machine, until now I was using version 2.15, which had a Windows Installer provided directly, so it was pretty straightforward, but when I switched to 2.17. BAM!! No easier way of downloading Installer and following series of ‘Next’ buttons. As any sane developer, I turned towards Official docs on how to install Binary. But It was pretty confusing at this part

https://cdn-images-1.medium.com/max/3160/1*qpGtN-8HHbN_4-F4OlN5Sw.png
Setting Environment Variables for geoserver

Here is how you can do it:

Step 1 : Download JAVA JRE 8

Note that Geoserver works only on JRE 8 so if you have JRE 9, please uninstall it and download JRE 8 from here. Depending upon your system download x64 or x32 bit version. On downloading you can install it like any other usual software. Please pay attention to the folder in which you are installing (e.g. C:/Program Files/) . Once you do that you need to add it in Environment variables as well which we’ll do afterward

Step 2: Download Geoserver

As mentioned earlier, from version 2.16 and above( It works exactly the same for any version), there is no executable file, hence we’ll use Platform independent Binary.

Head over to http://geoserver.org/release/stable/ and click on platform-independent Binary

https://cdn-images-1.medium.com/max/4200/1*8ZlxeK9XggnyuQqe5eZcVQ.png
Geoserver Download Page
https://cdn-images-1.medium.com/max/2000/1*x0IeG1dqsoT_pSGS-03zyg.png
Downloaded zip

once the .zip is downloaded, unzip it in the same folder where use JAVA folder lives (C:/ Program files/)

unzipping geoserver in the same directory where JAVA folder is

Step 3: Setting up environment Variables

We’ll set up 3 Variables in order to run the geoserver successfully. Search for environment variables in the search menu and open window. Inside Advanced tab Click on the Environment variables button to Open another window.

https://cdn-images-1.medium.com/max/4172/1*WkhEkIdTczz3eo1dVhMKmw.png
Environment variable window

Under System Variables add 3 new variables as follows: Copy the Variable name as it is and in Variable Value use the Browse Directory button to target to given folder

https://cdn-images-1.medium.com/max/2636/1*gKrVCMWULMfNbdcRXUYXmQ.png
JAVA HOME
https://cdn-images-1.medium.com/max/2652/1*390dIAf8Yh-GccLxGZFpYw.png
Geoserver Home
https://cdn-images-1.medium.com/max/2640/1*uXlAw4kS4aHf1sSjFnfGsg.png
Geoserver data directory

Step 4: Setting up CORS Policy

Finally !! We have installed geoserver, now before running let’s setup CORS policy so we can access all data via geoserver without any error

Go to the following path : geoserver/webapps/geoserver/WEB-INF/web.xml and uncomment CORS related code

https://cdn-images-1.medium.com/max/3108/1*-KeyoFUvuYLWrFejCQ9_GA.png
https://cdn-images-1.medium.com/max/2080/1*kbcBbu3Wi9O12THLvr88dA.png
CORS Related code can be found by searching CORS in web.xml file

Step 5: Running Geoserver

Once all the steps are completed, you can head over to geoserver/bin and double click on the startup batch file to run the geoserver

https://cdn-images-1.medium.com/max/2724/1*ni8bk288mpSQvPj4VvlDgw.png
Startup file location
https://cdn-images-1.medium.com/max/3916/1*zPsRqWW-dh69xdZ5HqRc7A.png
Geoserver started successfully

Geoserver Interface

Geoserver can be accessed via http://localhost:8080/geoserver/web/ with the following user credentials

Username: admin and Password: geoserver

https://cdn-images-1.medium.com/max/5760/1*WflmcmMNBWOrIxWmaqlkTQ.png

Geoserver Homepage

Leave a Comment

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