You are on page 1of 3

Tweak network configurations of

OpenGeo Suite Server


February 27, 2013 author: geobeyond posted in: Geospatial No comments yet

A completely web-based architecture


such as the OpenGeo Suite means that a
change in the IP address of the server
where it is installed impacts radically
operations of applications and services. It
often happens, however, that the server
on which the prototype has been
developed becomes a machine directly
used in production or even when the
network is forced to migrate toward a
different configuration then the OGS IP
address has to be changed. What does it
happen to the deployed applications and
how to proceed without having to
reinstall all over again?

Base installation of OGS on Windows servers


When installing from scratch the package of the OpenGeo Suite on Windows the applications
are deployed into the Jetty container whose configuration drives the way how they are
published on the Web (default value for IP address is 127.0.0.1). T herefore assuming that the
target address for the OGS server will be for example 192.168.0.10, lets see what are the steps
to follow.

Step 1

Click on Start to go into command shell


Run Cmd + Enter and then

1 cd "C:\Program Files\OpenGeo Suite\etc"

Edit the configuration file for the Jetty server

1 C:\Program Files\OpenGeo Suite\etc>notepad.exe .\jetty.xml

Change the IP address in the xml

1 <!-- ======================================================= -->


2 <!-- Configure a WebApp-->
3 <!-- ======================================================= -->
4 <!--
5 <New id="TestContext" class="org.mortbay.jetty.webapp.WebAppContext">
6 <Arg><Ref id="contexts"/></Arg>
7 <Arg><SystemProperty name="jetty.home" default="."/>/webapps/test</Arg>
8 <Arg>/</Arg>
9 <Set name="classLoader">
10 <New class="org.mortbay.jetty.webapp.TransformingWebAppClassLoader">
11 <Arg><Ref id="TestContext"/></Arg>
12 </New>
13 </Set>
14 <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default
15 <Set name="virtualHosts">
16 <Array type="java.lang.String">
17 <Item>192.168.0.10</Item>
18 </Array>
19 </Set>

Start the OpenGeo Suite from the Dashboard

1. Open Start > Programs > OpenGeo Suite > OpenSuite Dashboard
2. Click on the Start button

1 of 3 16/04/2017 23:03
Once all services are up and running we can:

Verify the right behavior of OGS applications on the default port:

1. Open a browser and enter the new URL GeoServ er http://192.168.0.10:8080/geoserver


2. Login to GeoServer

It remains to remedy to the visualization of the map projects that have been stored and
exported from the GeoExplorer application. In fact, each project uses the URL of OGS server at
the time of saving the map, and therefore requires adjustments if you do not want to generate
the same project from scratch.
GeoExplorer is a map viewer/composer developed from the OpenGeo SDK that uses a SQLite
database to store configurations of map projects.
Assuming that a map was saved with an URL like http://127.0.0.1:8080/geoexplorer/viewer
/#maps/1 (lets keep in mind the last number) then what do we need to do for recovering the
operation after a change of IP address?

Step 2
Dow nload a SQLite editor

Download the free editor SQLite Studio for MS Windows. Its a binary that can be
directly executed with no need for installation

Edit GeoExplorer database


Backup SQLite database. From the command shell in the HOME of the user run:

1 cd .opengeo
2 copy geoexplorer.db geoexplorer.db.backup

Open SQLite Studio and connect to geoexplorer.db


Open SQL query editor and run the following query to find the configurations of the map
with id 1

1 select * from maps where id=1

2 of 3 16/04/2017 23:03
From the resultset:

Go into edit mode on the config field of the row and then make Copy of the value

In a text editor:

Paste into a new window


Find 127.0.0.1 and replace with 192.168.0.10
Copy the whole modified text
Back to SQLite studio, paste and overwrite the config field value
Commit the change in the table maps
Open a browser, enter the new URL of the map stored in GeoExplorer
http://192.168.0.10:8080/geoexplorer/viewer/#maps/1 and the trick is done!

3 of 3 16/04/2017 23:03

You might also like