OpenGeo Suite for Linux
Release 3.0
OpenGeo
October 02, 2012
Contents
1 Installing OpenGeo Suite on Ubuntu i
1.1 Installing OpenGeo Suite Enterprise Edition . . . ii
1.2 Upgrading . . . iii
Upgrading from version 2.x to 3.x . . . iii
2 Installing OpenGeo Suite on CentOS and Red Hat v 2.1 Installing OpenGeo Suite Enterprise Edition . . . vi
2.2 Upgrading . . . vii
Upgrading from version 2.x to 3.x . . . vii
3 Installation details xi 3.1 Starting/Stopping the OpenGeo Suite. . . xi
3.2 Accessing web applications. . . xi
3.3 Accessing PostGIS . . . xii
3.4 List of packages . . . xii
3.5 System requirements . . . xii
This section describes how to install the OpenGeo Suite for Linux.
There are two Editions of the OpenGeo Suite:Community EditionandEnterprise Edition. Each Edition is available for CentOS and Ubuntu systems. In addition, there are even certain differences in installation based on the distribution version. Please see the appropriate section below that matches your system.
In addition, instructions are included available for installing GeoServer or PostGIS as standalone packages, instead of installing the entire OpenGeo Suite.
1 Installing OpenGeo Suite on Ubuntu
The commands contained in the following installation instructions assume root privileges. Note: If you are upgrading from a previous version, jump to the section entitledUpgrading.
Warning: Packages are only available for Ubuntu 10.04 and above. 1. Begin by importing the OpenGeo GPG key:
wget qO http://apt.opengeo.org/gpg.key | aptkey add
-2. Add the OpenGeo APT repository:
echo "deb http://apt.opengeo.org/suite/v3/ubuntu lucid main" >> /etc/apt/sources.list
3. Update APT:
apt-get update
4. Search for packages from OpenGeo:
apt-cache search opengeo
If the search command does not return any results, the repository was not added properly. Examine the output of the apt commands for any errors or warnings.
5. Install the OpenGeo Suite package (opengeo-suite):
apt-get install opengeo-suite
6. If the previous command returns an error, the OpenGeo repository may not have been added properly. Examine the output of the apt-get command for any errors or warnings.
7. During the installation process, you will be asked a few questions. The first question is regarding the proxy URL that GeoServer is accessed through publicly. This is only necessary if GeoServer is accessed through an external proxy. If unsure, leave this field blank and just press [Enter].
8. You will then be prompted for the name of the default GeoServer administrator account. Press [Enter] to leave it at the default of “admin”, or type in a new name.
9. Next, you will be asked for the default GeoServer administrator password. Press [Enter] to leave it at the default of “geoserver”, or type in a new password.
10. You will be asked if you want to install OpenGeo Suite-specific PostGIS extensions. Press [Enter] to accept. 11. If any other warning or dialog boxes show up, you can cycle through them by pressing [Alt-O].
12. You can launch the OpenGeo Suite Dashboard (and verify the installation was successful) by navigating to the following URL:
http://localhost:8080/dashboard/ Continue reading at theInstallation detailssection.
1.1 Installing OpenGeo Suite Enterprise Edition
1. Follow all of the steps from the previous section.
2. Now add the OpenGeo Enterprise APT repository. This repository is password protected. You will have received a user name and password when youregistered for the Enterprise Edition. Add the following APT repository using the command below, making sure to substitute in your user name for <username> and password for <password>.
Note: If your user name is an email address, substitute a %40 for the @ sign. Example: joe@example.com would become joe%40example.com.
Note: The single command below is wrapped over multiple lines.
echo "deb http://<username>:<password>@apt-ee.opengeo.org/suite/v3/ubuntu lucid main" >> /etc/apt/sources.list
3. Update APT:
apt-get update
4. Search for packages from OpenGeo:
apt-cache search opengeo
If the search command does not return any results, the repository was not added properly. Examine the output of the apt commands for any errors or warnings.
5. Install the OpenGeo Suite package (opengeo-suite-ee):
apt-get install opengeo-suite-ee
6. If the previous command returns an error, the OpenGeo repository may not have been added properly. Examine the output of the apt-get command for any errors or warnings.
1.2 Upgrading
Minor version upgrades of the OpenGeo Suite packages occur along with other system upgrades via the package manager. Or alternatively:
1. Begin by updating APT:
apt-get update
2. Update the opengeo-suite package:
apt-get install opengeo-suite
Major version upgrades do not happen automatically and require more steps as outlined in the following sections.
Upgrading from version 2.x to 3.x
The OpenGeo Suite version 3 contains numerous major version updates to its components. This upgrade is not-backward compatible and will not retain all of your previously configured PostGIS data. You will need to backup your data according to the specific procedures listed below before proceeding with the upgrade.
The procedure for upgrading is as follows:
1. Ensure the old (2.x) version of the OpenGeo Suite is running. 2. Change to the root user.
Note: If you don’t have direct access to the root account you must use the sudo command to execute the commands in the steps that follow. All the commands assume root access.
3. Make sure that your PostgreSQL binaries are on the path. By default they should be located in /usr/bin but your installation may vary. To test that this is set up correctly, open a Command Prompt and type psql --version. If you receive an error, find the binaries and update the PATH environment variable.
sudo su postgres
5. Download the archive available at http://repo.opengeo.org/suite/releases/pgupgrade/postgis_upgrade-3.0.zip and extract it to a temporary directory. To avoid permissions issues, the /tmp/suite_backup/pg_backup path will be created and used.
Warning: The /tmp directory is not recommended for long-term storage of backups, as the directory can often be purged as a part of normal system activity. If using a different directory, make sure that both the postgres and root users have read/write permissions to it.
mkdir -p /tmp/suite_backup/pg_backup cd /tmp/suite_backup/pg_backup
wget http://repo.opengeo.org/suite/releases/pgupgrade/postgis_upgrade-3.0.zip unzip postgis_upgrade-3.0.zip
6. Run the backup command:
perl postgis_upgrade.pl backup
Note: You can use standard PostGIS command line flags such as --host, --port and --username if you have customized your installation. You can also select only certain databases to backup by using the --dblist flag followed by a list of databases: --dblist db1 db2 db3. Full syntax is available by running with --help.
7. The script will run and create a number of files:
• Compressed dump files for every database backed up (<database>.dmp) • SQL output of server roles
8. The PostGIS data backup process is complete. Switch from the postgres user to the root user:
exit sudo su
-9. Back up your GeoServer data directory. This directory is located by default in /usr/share/opengeo-suite-data/geoserver_data. To back up this directory, copy it to another location. For example:
cp -r /usr/share/opengeo-suite-data/geoserver_data /tmp/suite_backup/data_dir_backup
10. Now you are ready to install OpenGeo Suite 3.x. To do this, it is now necessary to add an additional repository. This repository contains the version 3 packages. Run the following command (as root or with sudo):
echo "deb http://apt.opengeo.org/suite/v3/ubuntu lucid main" >> /etc/apt/sources.list
11. And if you are upgrading the OpenGeo Suite Enterprise Edition, run this additional command as well, substitut-ing in your user name and password:
Note: If your user name is an email address, substitute a %40 for the @ sign. Example: joe@example.com would become joe%40example.com.
Note: The single command below is wrapped over multiple lines.
echo "deb http://<username>:<password>apt-ee.opengeo.org/suite/v3/ubuntu lucid main" >> /etc/apt/sources.list
apt-get update
13. Install the OpenGeo Suite package:
Edition Command
Community Edition apt-get install opengeo-suite Enterprise Edition apt-get install opengeo-suite-ee 14. Ensure the newly-upgraded OpenGeo Suite is running.
15. Change to the postgres user and restore your PostGIS data by running the script again:
sudo su postgres
cd /tmp/suite_backup/pg_backup perl postgis_upgrade.pl restore
Note: As with the backup, standard PostGIS connection parameters may be used. You can also select only certain databases to restore with the --dblist flag as detailed above.
16. Your databases and roles will be restored. You can verify that the databases were created and data restored by running psql -l on the command line.
17. Exit out of the postgres user and change to root. 18. Stop the Tomcat service:
service tomcat6 stop
19. Restore your GeoServer data directory, renaming the existing one first. For example:
mv /usr/share/opengeo-suite-data/geoserver_data /tmp/suite_backup/data_dir_backup_30 cp -r /tmp/suite_backup/data_dir_backup /usr/share/opengeo-suite-data/geoserver_data
20. Change the owner of the restored data directory:
chown -R tomcat6 /usr/share/opengeo-suite-data/geoserver_data
21. Start the Tomcat service:
service tomcat6 start
Note: Memory requirements for OpenGeo Suite 3 have increased, which requires modification to the Tomcat Java configuration. These settings are not automatically updated on upgrade and must be set manually.
To make the change, edit the file /etc/default/tomcat6 and append -XX:MaxPermSize=256m to the JAVA_OPTScommand. Restart the OpenGeo Suite for the change to take effect.
Continue reading at theInstallation detailssection.
2 Installing OpenGeo Suite on CentOS and Red Hat
The commands contained in the following installation instructions assume root privileges. Note: If you are upgrading from a previous version, jump to the section entitledUpgrading.1. Change to the /etc/yum.repos.d directory:
cd /etc/yum.repos.d
2. Add the OpenGeo YUM repository. The exact command will differ depending on whether you are using Cen-tOS/RHEL 5 or 6, and whether you are using a 32 bit installation or 64 installation:
System Command CentOS 5, 32 bit wget http://yum.opengeo.org/suite/v3/centos/5/i386/OpenGeo.repo CentOS 5, 64 bit wget http://yum.opengeo.org/suite/v3/centos/5/x86_64/OpenGeo.repo CentOS 6, 32 bit wget http://yum.opengeo.org/suite/v3/centos/6/i686/OpenGeo.repo CentOS 6, 64 bit wget http://yum.opengeo.org/suite/v3/centos/6/x86_64/OpenGeo.repo RHEL 5, 32 bit wget
http://yum.opengeo.org/suite/v3/rhel/5/i386/OpenGeo.repo RHEL 5, 64 bit wget
http://yum.opengeo.org/suite/v3/rhel/5/x86_64/OpenGeo.repo RHEL 6, 32 bit wget
http://yum.opengeo.org/suite/v3/rhel/6/i686/OpenGeo.repo RHEL 6, 64 bit wget
http://yum.opengeo.org/suite/v3/rhel/6/x86_64/OpenGeo.repo 3. Now we are ready to install the OpenGeo Suite. The package is called opengeo-suite:
yum install opengeo-suite
4. If the previous command returns an error, the OpenGeo repositories may not have been added properly. Examine the output of the yum command for any errors or warnings.
5. You can launch the OpenGeo Suite Dashboard (and verify the installation was successful) by navigating to the following URL:
http://localhost:8080/dashboard/ Continue reading at theInstallation detailssection.
2.1 Installing OpenGeo Suite Enterprise Edition
1. Follow all of the steps from the previous section.
2. Now add the OpenGeo Enterprise YUM repository. This repository is password protected. You will have received a user name and password when youregistered for the Enterprise Edition. Add the following YUM repository using the commands below, making sure to substitute in your user name for <username> and password for <password>. Again, the exact command will differ depending on your system.
System Command CentOS
5, 32 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/centos/5/i386/OpenGeoEE.repo CentOS
5, 64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/centos/5/x86_64/OpenGeoEE.repo CentOS
6, 32 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/centos/6/i686/OpenGeoEE.repo CentOS
6, 64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/centos/6/x86_64/OpenGeoEE.repo RHEL 5,
32 bit
wget --user=’<username>’ --password=’<password>’ http://yum-ee.opengeo.org/rhel/5/i386/OpenGeoEE.repo RHEL 5,
64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/rhel/5/x86_64/OpenGeoEE.repo RHEL 6,
32 bit
wget --user=’<username>’ --password=’<password>’ http://yum-ee.opengeo.org/rhel/6/i686/OpenGeoEE.repo RHEL 6,
64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/rhel/6/x86_64/OpenGeoEE.repo
3. Edit the downloaded OpenGeoEE.repo file, filling in your user name and password in place of <yourUserName>and <yourPassword>.
Note: If your user name is an email address, substitute a %40 for the @ sign. Example: joe@example.com would become joe%40example.com.
4. Now we are ready to install the OpenGeo Suite. The package is called opengeo-suite-ee: yum install opengeo-suite-ee
2.2 Upgrading
Minor version upgrades of the OpenGeo Suite packages occur along with other system upgrades via the package manager. Or alternatively you can:
1. Begin by updating YUM: yum update
2. The relevant OpenGeo packages should be included in the upgrade list. If you do not wish to do a full update, cancel the upgrade and install the opengeo-suite package manually:
yum install opengeo-suite
Major version upgrades do not happen automatically and require more steps as outlined in the following sections.
Upgrading from version 2.x to 3.x
The OpenGeo Suite version 3 contains numerous major version updates to its components. This upgrade is not-backward compatible and will not retain all of your previously configured data. You will need to backup your data according to the specific procedures listed below before proceeding with the upgrade.
Warning: Upgrading on CentOS/RHEL 5 differs from upgrading on CentOS/RHEL 6 and above. Version 5 requires that the previous installation of the OpenGeo Suite be removed before upgrading. Versions 6 and above can do an upgrade in place. In both cases you must back up your data before proceeding.
Backup PostGIS data
1. Ensure the old (2.x) version of the OpenGeo Suite is running.
2. Make sure that your PostgreSQL binaries are on the path. By default they should be located in /usr/bin but your installation may vary. To test that this is set up correctly, open a Command Prompt and type psql --version. If you receive an error, find the binaries and update the PATH environment variable.
3. Change user to the postgres user.
sudo su postgres
4. Download the archive available at http://repo.opengeo.org/suite/releases/pgupgrade/postgis_upgrade-3.0.zip and extract it to a temporary directory. To avoid permissions issues, the /tmp/suite_backup/pg_backup path will be created and used.
Warning: The /tmp directory is not recommended for long-term storage of backups, as the directory can often be purged as a part of normal system activity. If using a different directory, make sure that both the postgres and root users have read/write permissions to it.
mkdir -p /tmp/suite_backup/pg_backup cd /tmp/suite_backup/pg_backup
wget http://repo.opengeo.org/suite/releases/pgupgrade/postgis_upgrade-3.0.zip unzip postgis_upgrade-3.0.zip
5. Run the backup command:
perl postgis_upgrade.pl backup
Note: You can use standard PostGIS command line flags such as --host, --port and --username if you have customized your installation. You can also select only certain databases to backup by using the --dblist flag followed by a list of databases: --dblist db1 db2 db3. Full syntax is available by running with --help.
6. The script will run and create a number of files:
• Compressed dump files for every database backed up (<database>.dmp) • SQL output of server roles
7. The PostGIS data backup process is complete. Switch from the postgres user to the root user:
exit sudo su
-Backup GeoServer configuration
1. Back up your GeoServer data directory. This directory is located by default in /usr/share/opengeo-suite-data/geoserver_data. To back up this directory, you can create an archive of it, or simply copy it to another location:
cp -r /usr/share/opengeo-suite-data/geoserver_data /tmp/suite_backup/data_dir_backup
Uninstall OpenGeo Suite 2.x
1. Due to conflicts with the way that CentOS 5 manages postgresql packages, it is necessary to active remove the entire OpenGeo Suite installation before continuing with the upgrade. The easiest way to remove the entire set of packages for a Suite 2.x installation is to remove the postgresql84-libs package.
yum remove postgresql84-libs
Install OpenGeo Suite 3.x
Now you are ready to install OpenGeo Suite 3.x. To do this, it is now necessary to add an additional repository. This repository contains the version 3 packages.
1. If not already, make sure you are running as root:
sudo su
-2. Change to the /etc/yum.repos.d directory:
cd /etc/yum.repos.d
3. Rename the existing repository file(s):
for REPO in OpenGeo*.repo; do mv $REPO $REPO.old; done;
4. Run the following command:
System Command CentOS 5, 32 bit wget http://yum.opengeo.org/suite/v3/centos/5/i386/OpenGeo.repo CentOS 5, 64 bit wget http://yum.opengeo.org/suite/v3/centos/5/x86_64/OpenGeo.repo CentOS 6, 32 bit wget http://yum.opengeo.org/suite/v3/centos/6/i686/OpenGeo.repo CentOS 6, 64 bit wget http://yum.opengeo.org/suite/v3/centos/6/x86_64/OpenGeo.repo RHEL 5, 32 bit wget
http://yum.opengeo.org/suite/v3/rhel/5/i386/OpenGeo.repo RHEL 5, 64 bit wget
http://yum.opengeo.org/suite/v3/rhel/5/x86_64/OpenGeo.repo RHEL 6, 32 bit wget
http://yum.opengeo.org/suite/v3/rhel/6/i686/OpenGeo.repo RHEL 6, 64 bit wget
http://yum.opengeo.org/suite/v3/rhel/6/x86_64/OpenGeo.repo 5. And if you are upgrading the OpenGeo Suite Enterprise Edition, run this additional command as well,
System Command CentOS
5, 32 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/centos/5/i386/OpenGeoEE.repo CentOS
5, 64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/centos/5/x86_64/OpenGeoEE.repo CentOS
6, 32 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/centos/6/i686/OpenGeoEE.repo CentOS
6, 64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/centos/6/x86_64/OpenGeoEE.repo RHEL 5,
32 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/rhel/5/i386/OpenGeoEE.repo RHEL 5,
64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/rhel/5/x86_64/OpenGeoEE.repo RHEL 6,
32 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/rhel/6/i686/OpenGeoEE.repo RHEL 6,
64 bit
wget --user=’<username>’ --password=’<password>’
http://yum-ee.opengeo.org/suite/v3/rhel/6/x86_64/OpenGeoEE.repo Edit the download OpenGeoEE.repo file, filling in your user name and password in place of <yourUserName>and <yourPassword>.
Note: If your user name is an email address, substitute a %40 for the @ sign. Example: joe@example.com would become joe%40example.com.
6. Clean your repository sources:
yum clean all
7. Update your repository sources:
yum update
8. Install the OpenGeo Suite package:
Edition Command
Community Edition yum install opengeo-suite Enterprise Edition yum install opengeo-suite-ee
Restore PostGIS data
1. Ensure the newly-upgraded OpenGeo Suite is running.
2. Change to the postgres user and restore your PostGIS data by running the script again:
sudo su postgres
cd /tmp/suite_backup/pg_backup perl postgis_upgrade.pl restore
Note: As with the backup, standard PostGIS connection parameters may be used. You can also select only certain databases to restore with the --dblist flag as detailed above.
3. Your databases and roles will be restored. You can verify that the databases were created and data restored by running psql -l on the command line.
exit
Restore GeoServer configuration
1. Stop tomcat and restore the GeoServer data directory to its original location.
service tomcat5 stop
rm -rf /usr/share/opengeo-suite-data/geoserver_data
mv /tmp/suite_backup/data_dir_backup /usr/share/opengeo-suite-data/geoserver_data chown -R tomcat /usr/share/opengeo-suite-data/geoserver_data
2. Restart tomcat.
service tomcat5 start
Note: Memory requirements for OpenGeo Suite 3 have increased, which requires modification to the Tomcat Java configuration. These settings are not automatically updated on upgrade and must be set manually.
To make the change, edit the file /etc/sysconfig/tomcat6 (or /etc/sysconfig/tomcat5 if it exists) and append -XX:MaxPermSize=256m to the JAVA_OPTS command. Restart the OpenGeo Suite for the change to take effect.
Continue reading at theInstallation detailssection.
3 Installation details
This section discusses some helpful information about the OpenGeo Suite, as well as how to access the various components after installation.
3.1 Starting/Stopping the OpenGeo Suite
GeoServer, GeoExplorer, and all other web-based containers including the documentation are installed into the existing Tomcat instance on the machine. Starting and stopping these applications are therefore accomplished by managing them through the standard Tomcat instance. Tomcat is installed as a service under the name of tomcat6 (or possibly tomcat5, depending on your system), and can be managed accordingly:
/etc/init.d/tomcat6 start /etc/init.d/tomcat6 stop
PostGIS is also installed as a service, under the name of postgresql, and can be managed in the same way as Tomcat: /etc/init.d/postgresql start
/etc/init.d/postgresql stop
Both services are started and set to run automatically when the OpenGeo Suite is installed.
3.2 Accessing web applications
The easiest way to launch the web-based applications contained in the OpenGeo Suite is via the Dashboard. All web applications are linked from this application. The Dashboard is accessible via the following URL:
Note: You will need to change the port number if your Tomcat installation is serving on a different port.
Application URL
OpenGeo Suite Dashboard http://localhost:8080/dashboard/
GeoServer http://localhost:8080/geoserver/
GeoExplorer http://localhost:8080/geoexplorer/ OpenGeo Suite Documentation http://localhost:8080/opengeo-docs/ OpenGeo Recipe Book http://localhost:8080/recipes/
3.3 Accessing PostGIS
You can access PostGIS in one of two ways: via the command line will the psql application, or via a graphical interface with the pgadmin3 application. Both commands should be on the path and can be invoked from any Terminal window. If unfamiliar with PostGIS, start with pgadmin3.
This version of PostGIS is running on port 5432, with administrator username and password opengeo / opengeo.
3.4 List of packages
Once installed, you will have the following packages installed on your system:
Package Name Description
opengeo-suite OpenGeo Suite The full OpenGeo Suite and all its contents. All packages listed below are installed as dependencies with this package. Contains GeoExplorer, Styler, GeoEditor, Dashboard, Recipe Book, and more. opengeo-docs OpenGeo Suite
Documentation
Full documentation for the OpenGeo Suite.
opengeo-geoserverGeoServer High performance, standards-compliant map and geospatial data server.
opengeo-jai Java Advanced Imaging (JAI)
Set of Java toolkits to provide enhanced image rendering abilities. opengeo-postgis PostGIS Robust, spatially-enabled object-relational database built on
PostgreSQL. opengeo-suite-dataOpenGeo Suite
Data
Sample data for use with the OpenGeo Suite.
pgadmin3 pgAdmin III Graphical client for interacting with PostgreSQL/PostGIS. opengeo-suite-ee (Enterprise Edition only) OpenGeo Suite Enterprise Edition package
Enterprise Edition functions and libraries.
3.5 System requirements
The OpenGeo Suite has the following system requirements: • Operating System: Ubuntu 10.04 and 10.10, CentOS 5-6 • Memory: 512MB minimum (1GB recommended)
• Disk space: 750MB minimum (plus extra space for any loaded data) • Browser: Any modern web browser is supported.