Adding Geoserver’s extensions to OpenGeo Suite in production
- February 4, 2012
- posted in: Geospatial
- No comments yet
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:
|
1 |
$ mkdir geoserver_ext |
|
1 |
$ cd geoserver_ext |
For example you want to install the new data stores listed below by grabbing:
MySQL Data Store:
|
1 |
$ wget http://downloads.sourceforge.net/geoserver/geoserver--mysql-plugin.zip |
SQL Server Data Store:
|
1 |
$ 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:
|
1 2 |
$ cd /usr/share/opengeo-geoserver/ $ sudo cp geoserver.war geoserver.war._<timestamp> |
Then you can export the original web archive to a temporary directory:
|
1 2 3 |
$ 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:
|
1 2 3 |
$ 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:
|
1 |
$ sudo jar cvf geoserver.war index.html www/ data/ META-INF/ WEB-INF/ |
Then copy this new geoserver deployment into Tomcat:
|
1 2 |
$ 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!








