Updating apps on OpenGeo suite Community Edition

I would like to update PostgreSQL and PostGIS on OpenGeo suite Community Edition to a newer version, maybe the other applications too (GeoServer, OpenLayers, etc.). Can it be done? Can someone point me the right direction?

If you go to your Documentation, section 2.7 is about upgrading the postgis database. Hard or soft upgrade options are available.
My path lookes something like…

I:Program Files (x86)OpenGeoOpenGeo Suitewebappsdocspostgisindex.html

However note that there is no mention of 9.0 in the opengeo suite.
It looks like to me that 8.4 and 1.5 are the latest versions that come inside opengeo suite installs.

The really short answer:

Use the upgrade, but I'm not sure if this upgrades PostgreSQL/PostGIS to 9.x and 1.5 respectively.

I think the simplest path would be to upgrade using the latest installer, and if you want the latest version of Postgres/PostGIS you can read the 'Short answer' and 'Long Answer' sections below.

Short answer:

The OpenGeo Suite uses a custom build (made by OpenGeo) of PostgreSQL and PostGIS. One way to update to newer versions is to back up your database(s) with the pg_dump command.

$ pg_dump my_database > my_database.sql

You can then install a newer version such as PostgreSQL 9.0 and PostGIS 1.5 and import the database backup into the new database.

$ psql -f my_database.sql
  • If you want to keep the existing jetty install, replacing the apps is straight forward. You can delete (or backup if you've made changes to) the existing apps under… /webapps and then copy the new apps (from a new install) into the same directory. Community edition does not provide .war files for the apps, but you do get them with Enterprise edition.

I do not recommend this since the new apps may have different directory path dependencies It would be easier to install the new version then upgrade Postgres/PostGIS.

Long answer:

It is probably a good idea to uninstall Postgres 8.4 or at the very least turn it off via the Dashboard or use pg_ctl to shut it down. To remove it from OSX or Linux you can

rm -r /opt/pgdata /opt/pgsql

Depending on you operating system, there are a number of options for installing a new version. You can install Postgres/PostGIS from EnterpriseDB for most operating systems using their Stackbuilder, use apt-get or yum for Linux, and the Kyng Chaos site offers an OSX port as well.

If you upgrade to PostgreSQL 9.x, PGAdmin III should also be updated as well.

In some instances (EnterpriseDB, OSX Kyng Chaos) a postgis template is not automatically created so you will need to create one.

sudo -u postgres createdb template_postgis sudo -u postgres createlang -dtempare_postgis plpgsql sudo -u postgres psql -dtemplate_postgis -f /usr/share/postgresql/9.0/contrib/postgis-1.5/postgis.sql sudo -u postgres psql -dtemplate_postgis -f /usr/share/postgresql/9.0/contrib/postgis-1.5/spatial_ref_sys.sql sudo -u postgres psql -dtemplate_postgis -c"select postgis_lib_version();"

If you use the Dashboard, you will need to edit the paths to postgis on the config.ini file. In OSX and Linux, this is found in your home directory (or the home directory of the account used to install the OpenGeo Suite) under the .opengeo directory. In Windows it is found in C:Documents and Settings.opengeo