Tag: OpenGeo Suite

Tweak network configurations of OpenGeo Suite Server

A completely web-based architecture OGS 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 Therefore assuming that the target address for the OGS server will be for example, let’s see what are the steps to follow.

Step 1

  • Click on Start to go into command shell
  • Run “Cmd + Enter” and then
  • [crayon lang=”ps”]
    cd “C:\Program Files\OpenGeo Suite\etc”

  • Edit the configuration file for the Jetty server
  • [crayon lang=”ps”]
    C:\Program Files\OpenGeo Suite\etc>notepad.exe .\jetty.xml

  • Change the IP address in the xml
  • [crayon lang=”xml”]

    Programs –> OpenGeo Suite –> OpenSuite Dashboard

  • Click on the Start button
  • OGS dashboard

      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 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 (let’s 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

    Download a SQLite editor

    Download the free editor SQLite Studio for MS Windows. It’s 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:
    • [crayon lang=”ps”]
      cd .opengeo
      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
    • [crayon lang=”t-sql”]
      select * from maps where id=1

      GeoExplorer database result

        From the resultset:

      • Go into edit mode on the config field of the row and then make Copy of the value
      • Config field value
        In a text editor:

      • Paste into a new window
      • Find “” and replace with “”
      • 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 and the trick is done!

      Read more

Adding Geoserver’s extensions to OpenGeo Suite in production

OpenGeo Suite is smoothly installed in Ubuntu Server as documented here below, except for the database component because each web application is deployed into a Tomcat container. Such deployment is performed by copying the necessary applications installed with the suite to the webapps directory of Tomcat usually located at the following path /var/lib/tomcat6/webapps/. Specifically they are located in these directories while the installation is performed:

Component Web Archive Path
GeoServer geoserver.war /usr/share/opengeo-geoserver/
Dashboard dashboard.war /usr/share/opengeo-suite/
GeoWebCache geowebcache.war /usr/share/opengeo-suite/
GeoEditor geoeditor.war /usr/share/opengeo-suite/
GeoExplorer geoexplorer.war /usr/share/opengeo-suite/
Recipes recipes.war /usr/share/opengeo-suite/

Tips: If you want to check if the web archives installed are those deployed into Tomcat, execute the md5sum command on each file

First of all, you have to check the Geoserver’s version currently installed by loading its default page available at http://localhost/geoserver. The extension to be downloaded has to correspond accordingly to the above-checked version.

Create a temporary directory in the user home:

[crayon lang=”bash”]
$ mkdir geoserver_ext
[crayon lang=”bash”]
$ cd geoserver_ext

For example you want to install the new data stores listed below by grabbing:

MySQL Data Store:
[crayon lang=”bash”]
$ wget http://downloads.sourceforge.net/geoserver/geoserver–mysql-plugin.zip

SQL Server Data Store:
[crayon lang=”bash”]
$ wget http://downloads.sourceforge.net/geoserver/geoserver–sqlserver-plugin.zip

Before performing all operations to take over the current installed Geoserver WAR with a more library extension, it is necessary to execute a backup of this version:
[crayon lang=”bash”]
$ cd /usr/share/opengeo-geoserver/
$ sudo cp geoserver.war geoserver.war._
Then you can export the original web archive to a temporary directory:
[crayon lang=”bash”]
$ sudo mkdir temp_war
$ cd temp_war
$ sudo jar xvf ../geoserver.war

Now it’s time to endorse the library directory with these new extensions:
[crayon lang=”bash”]
$ sudo unzip -d . /home/geoserver_ext/geoserver–mysql-plugin.zip
$ sudo unzip -d . /home/geoserver_ext/geoserver–sqlserver-plugin.zip
$ sudo cp *.jar WEB-INF/lib/

At the end of this activity it is necessary to generate the new Web Archive as follows:
[crayon lang=”bash”]
$ sudo jar cvf geoserver.war index.html www/ data/ META-INF/ WEB-INF/

Then copy this new geoserver deployment into Tomcat:
[crayon lang=”bash”]
$ sudo cp geoserver.war /var/lib/tomcat6/webapps/
$ sudo rm -rf /var/lib/tomcat6/webapps/geoserver/

Restart Tomcat and load GeoServer application again. A screen showing a new vector data store for SQL Server will be displayed!

Read more

OpenGeo Suite Linux Server Installation

In this post we want to explain how OpenGeo Suite can be easily and rapidly installed in a linux box. We assume to work on Linux but the same can be applied to Windows servers or Mac OS X machines equipped with a specific package.
However, given that we worked with several linux installations and that such installations are the most proper choice for the management in production environment, we now describe how it is easy to install it through an APT-GET repository.
Hereafter is our Ubuntu target server description [as VMware virtual machine on ESXi infrastructure]:

Server Value
OS Ubuntu 10.04 Linux 32-bit
Virtual Memory 2 GB
Virtual CPU 1

Run the following command shell as sudo.

First of all, import OpenGeo GPG key by executing:
[crayon lang=”bash”]
$ sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add –
Tip: Since sometime an error associated with “apt-key” command is displayed, check if some distro treats pipe differently and retype “sudo” or alternatively split that up.
[crayon lang=”bash”]
$ sudo wget -qO- http://apt.opengeo.org/gpg.key > gpg.key
$ sudo apt-key add gpg.key
Add the APT repository for OpenGeo Suite:
[crayon lang=”bash”]
$ sudo echo “deb http://apt.opengeo.org/ubuntu lucid main” >> /etc/apt/sources.list

Update APT:
[crayon lang=”bash”]
$ sudo apt-get update

Execute a search for packages available:
[crayon lang=”bash”]
$ sudo apt-cache search opengeo
Tip: The search has to return at least one result otherwise the repository hasn’t been added correctly.

Make OpenGeo Suite package (opengeo-suite) installed:
[crayon lang=”bash”]
$ sudo apt-get install opengeo-suite

Post installation

Once the installation process is ended you can display the applications provided by the suite through an Apache Web Server.
To do this, enable a proxy into Apache. First of all, create a suitable configuration for it:
[crayon lang=”bash”]
$ sudo ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf
$ sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load
$ sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load

Then add a proxy-pass configuration for the local Tomcat container by setting:
[crayon lang=”bash”]
$ sudo chmod 666 /etc/apache2/sites-available/default
$ sudo sed -i ‘$d’ /etc/apache2/sites-available/default
$ sudo sh -c “echo ‘ ‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyRequests Off’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘# Remember to turn the next line off if you are proxying to a NameVirtualHost’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPreserveHost On’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ ‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ Order deny,allow’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ Allow from all’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘
‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ ‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /geoserver http://localhost:8080/geoserver’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /geoserver http://localhost:8080/geoserver’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /geoexplorer http://localhost:8080/geoexplorer’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /geoexplorer http://localhost:8080/geoexplorer’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /geoeditor http://localhost:8080/geoeditor’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /geoeditor http://localhost:8080/geoeditor’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /geowebcache http://localhost:8080/geowebcache’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /geowebcache http://localhost:8080/geowebcache’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /dashboard http://localhost:8080/dashboard’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /dashboard http://localhost:8080/dashboard’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /recipes http://localhost:8080/recipes’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /recipes http://localhost:8080/recipes’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPass /opengeo-docs http://localhost:8080/opengeo-docs’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ProxyPassReverse /opengeo-docs http://localhost:8080/opengeo-docs’ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘ ‘ >> /etc/apache2/sites-available/default”
$ sudo sh -c “echo ‘‘ >> /etc/apache2/sites-available/default”

Alternatively, use the script at this location here.

Finally, restart Apache by executing:
[crayon lang=”bash”]
$ sudo service apache2 restart

Read more