
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 straight forward, but when I switched to 2.17. BAM!! No more easy was of downloading Installer and following series of ‘Next’ buttons. As any sane developer, I turned towards Official docs on how toinstall Binary. But It was pretty confusing at this part
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 afterwards
Step 2: Download Geoserver
As mentioned earlier, from version 2.16 and above( It works exactly 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
Geoserver Download Page
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 setup 3 Variables in order to run geoserver successfully. Search for environment variables in search menu and open window. Inside Advance tab Click on Environment variables button to Open another window.
Environment variable window
Under System Variables add 3 new variables as follows : Copy the Variable name as it is and in Variable Value use Browse Directory button to target to given folder
JAVA HOME
Geoserver Home
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 Following path : -INF.xml and uncomment CORS related code
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 startup batch file to run the geoserver
Startup file location
Geoserver started successfully
Geoserver Interface
Geoserver can be accessed via http://localhost:8080/geoserver/web/ with following user cred Username : admin and Password : geoserver
Geoserver Homepage
Leave a Reply