How to Set Up an Esri
Geoportal Server
Aggregate geospatial resources using open source products
By Richard Kachelriess and Christine White, Esri
Esri Geoportal Server is a suite of software modules that provides
seamless communication with data services that use a wide range of
What You Will Do
1. Download programs and files.
communication protocols and supports searching, publishing, and
2. Perform preinstallation computer preparation.
managing standards-based resources. One of these components is
3. Install PostgreSQL database.
a geoportal, which is a gateway that provides access to geospatial
4. Install Java Developer Kit and Runtime Environment.
resources such as metadata records and catalogs, web services,
5. Install Apache Tomcat.
Wikipedia articles, Flickr content, YouTube videos, SharePoint doc-
6. Install Esri Geoportal Server.
uments, RSS feeds, KML documents, and REST URLs.
7. Set up the user and schema for the geoportal in PostgreSQL.
The Esri Geoportal Server is an open source product that is free
8. Deploy the geoportal app.
and does not require ArcGIS Desktop or ArcGIS Server licens-
9. Modify the gpt.xml file.
ing. The State of Montana, National Oceanic and Atmospheric
10. Modify Java Database Connectivity (JDBC) .jar file.
Administration (NOAA) National Climatic Data Center, Norwegian
11. Log in to the geoportal.
Mapping Agency, and other organizations use Esri’s geoportal tech-
12. Register ArcGIS Server with the geoportal.
nology to manage and publish the metadata for their geospatial re-
sources so users can discover and connect to those resources.
1. Download Programs and Files
About This Tutorial At minimum, the Esri Geoportal Server requires the Java
Development Kit and Runtime Environment, a relational database
This tutorial steps through implementing a geoportal on an intranet
management system (RDBMS), and a servlet container. Although
and uses base software that is also open source. This geoportal will
the Esri Geoportal Server supports several different options for the
be accessible only on your local machine or your organization’s
RDBMS and web servlet, this tutorial uses the PostgreSQL RDBMS
intranet. This implementation uses the PostgreSQL database and
and the Apache Tomcat servlet. Download the programs and files
the Apache Tomcat servlet. To use a different database or servlet,
listed in Table 1 either by searching online for the specific versions
please read the Geoportal wiki and installation guides online at
listed or by using the links provided with the documents download-
www.esriurl.com/geoportalserver.
ed from the ArcUser website.
This tutorial assumes you can
• Navigate the computer’s file system with Windows Explorer.
• Create and name new folders. Component Function Version
• Copy and move files between folders. Esri Geoportal Geoportal software 1.1
• Extract a ZIP file. Server
• Open a web browser and enter a URL. PostgreSQL RDBMS 8.4.7
Apache Tomcat Web servlet 6.0.32
What You Will Need
Java Development Java controller SE 6 Update 24 JDK
• Windows XP/Vista/7 Kit with Runtime
• Administrator privileges Environment
• An Internet connection to download the required software JDBC Configuration Connects Tomcat to Postgresql-8.4.701-
• PDFs, downloaded from esri.com/arcuser, containing links to File Postgres jdbc4.jar
software locations and configuration information
Table 1: Software required in this tutorial
54 au Summer 2011 esri.com
Hands On
Configure PostgreSQL Database
You need to streamline your computer’s access to the PostgreSQL
database to simplify the geoportal’s installation and operation.
1. Navigate to C:\Program Files\PostgreSQL\8.4\data.
2. Open pg_hba.conf in Notepad (right-click and choose Edit). Go to
(Ctrl+G) line 70. This line is below the one that starts with # IPv4.
Change md5 to trust.
3. At the end of the file, add the following two lines, substituting your
IP address (which you wrote down earlier) for <IP Address>:
# My computer’s connection:
host all all <IP Address>/32 trust
4. Save and close the file.
These changes open up the Postgres database to connections from
your computer only. It does not open up the database to external
computers. The change to line 70 simplifies connections through
localhost, and the new lines allow your computer to connect to the
database via a TCP/IP connection.
For the database commands that will configure the Postgres da-
tabase for the geoportal to run correctly, you need to update your
computer’s Environmental Variables.
Run create_schema_pg from the command line to generate
1. Right-click My Computer and select Properties.
tables for the geoportal in the PostgreSQL database.
2. On the Advanced tab, click Environmental Variables.
3. In the System variables section of the new window, select the
PATH entry and click Edit.
2. Perform Preinstallation Computer Setup
4. Go to the end of the text in the Variable Value box.
Prior to installing the Esri Geoportal Server and its components,
5. Do not delete or overwrite any existing text! Add
you need to create some folders and find out some basic information
;C:\Program Files\PostgreSQL\8.4\bin
about your computer. Note: The C:\ drive is used in this tutorial for
simplicity; any drive on the host computer can be used to install the to the end of the text.
software for the geoportal server—just make sure to adjust any path Ensure that there isn’t a space between the semicolon (;) that
statements appropriately. Please create the following new folders on starts this line and C:\.
your computer: 6. Click OK three times to save the changes.
7. Restart your computer for the changes to take effect.
C:\geoportal
C:\lucene 4. Install the Java Developer Kit and Runtime
C:\lucene\assertion Environment
Although the geoportal will not be available on the Internet, you Run the installer and accept all the defaults.
need to know the IP address of your computer. The simplest way to
find this information is by typing ipconfig in the command prompt. 5. Install Apache Tomcat 6
1. Open the Command Prompt window (Start > Programs > Apache Tomcat 6 is web servlet software that manages web appli-
Accessories > Command Prompt). cations. You will need web servlet software to deploy the geoportal
2. Type ipconfig. web application. Run the installer and accept all defaults. Verify that
3. Write down the IP address. ________________________________ the Tomcat port number is 8080. Don’t enter an administrator user
name or password.
3. Install PostgreSQL 8.4.7 Configure Apache Tomcat 6 Service
The PostgreSQL RDBMS will store the geoportal user, resource 1. Right-click My Computer and select Manage.
metadata, and harvesting scheduling information for the geoportal. 2. Expand Services and Applications and select Services.
1. Run the Windows installer for PostgreSQL version 8.4.7. Accept all 3. Find Apache Tomcat 6 in the Services list and ensure that the
defaults. Service Status is Started. (If not, right-click it and choose Start.)
2. When asked to create a password for the postgres user, enter 4. Right-click the services and select Properties.
postgres. (Note: If your network has a password policy that en- 5. Change Startup type to Automatic.
forces strong passwords, choose a stronger password.) 6. Click OK to save the change and close.
3. Verify that the PostgreSQL port number is 5432. 7. Verify the installation by opening a web browser and going to http://
localhost:8080. A default Tomcat page should appear.
esri.com Summer 2011 au 55
For geoportal10 user, enter the same password you designated
6. Install the Esri Geoportal Server
for the geoportal user when you ran the grants_pg script—in most
Extract the contents of geoportal-1.0.zip, the geoportal ZIP file, into
cases, this will be geoportal. Upon the completion of the script, it will
the C:\geoportal folder.
generate a text file, geoportal_schema.txt, and invoke a text editor to
display the results of the script.
7. Set up Geoportal User and Schema in
PostgreSQL Verify Geoportal Tables Were Generated Correctly
1. Open Postgres System Administrator.
Geoportal User Setup
2. Click Start > All Programs > PostgreSQL 8.4 > pgAdmin III.
1. Reopen the Windows Command Prompt.
3. Double-click PostgreSQL 8.4 (localhost:5432).
2. Type cd C:\geoportal\Database Scripts\PostgreSQL to
4. Enter postgres, the password for postgres user.
change to this directory. (Hint: If the geoportal folder is not
5. In the table tree, navigate to Databases > postgres > Schemas >
on C:\, type cd /d <another drive letter>:\ to change from
geoportal > Tables.
the default C:\ prompt.) Type dir to see the contents of this
6. Verify that Tables contains the following seven tables:
directory.
3. Type grants _ pg to see usage instructions for this script. You gpt _ harvesting _ history
will enter parameters according to these usage instructions in the gpt _ harvesting _ jobs _ completed
next step. gpt _ harvesting _ jobs _ pending
4. Type the following parameters and press Enter. You will be
prompted to create a password for Geoportal User. Use the pass- gpt _ resource
word geoportal, unless your system requires a stronger password. gpt _ resource _ data
grants _ pg localhost 5432 postgres geoportal
gpt _ search
postgres geoportal
5. Enter the password for the new role (geoportal). Enter the pass- gpt _ user
word again (geoportal).
Upon the completion of the script, it will generate a text file, 8. Deploy the Geoportal Web Application
grants_pg.txt, and invoke a text editor to display this file, showing Copy geoportal.war from
the results of the script. c:\geoportal\Web Applications\Geoportal
to
c:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps
Apache Tomcat should automatically create a new folder in the
webapps folder called geoportal. This is the geoportal website. If
the folder is not created, open the Services window (My Computer
> Manage) and restart the Apache Tomcat 6 service. Open a web
browser and go to http://localhost:8080/geoportal. The default geo-
portal home page should appear.
9. Configure the gpt.xml File
The PDF files downloaded from the ArcUser website at the beginning
of this exercise contain Tables 2 and 3. Look at the highlighted lines
Add an ArcGIS Server to the geoportal. in Table 2 for the required changes to the gpt.xml file. (Be sure to
pay attention to indentation when commenting out sections.)
1. In Windows Explorer, navigate to C:\Program Files\Apache
Populating Geoportal Schema in PostgreSQL Software Foundation\Tomcat 6.0\webapps\geoportal\WEB-INF\
The previous section created the geoportal schema in the PostgreSQL classes\gpt\config.
database. This section will populate that schema with the tables the 2. Open gpt.xml in Notepad.
geoportal needs to function. 3. Make the changes shown in Table 2 in the PDF file to the gpt.xml
1. At the command prompt, type create _ schema _ pg to see file.
usage instructions for this script. You will enter parameters ac- 4. Save and close gpt.xml.
cording to these usage instructions in the next step.
2. Type the following parameters: 10. Modify the Java Database Connectivity
create _ schema _ pg localhost 5432 postgres (JDBC) .jar File
geoportal 1. Copy postgresql-8.4-701.jdbc4.jar to C:\Program Files\Apache
Software Foundation\Tomcat 6.0\lib.
56 au Summer 2011 esri.com
Hands On
2. Copy geoportal.xml from C:\Geoportal\
Other\JNDI Configuration to C:\Program
Files\Apache Software Foundation\
Tomcat 6.0\conf\Catalina\localhost.
3. Open geoportal.xml with Notepad and
make the changes shown in Table 3 in
the PDF file. Note that for the password
parameter, this is the password for your
geoportal user. If you used a strong pass-
word when setting up the geoportal, use
that password.
4. Save and close geoportal.xml.
5. Restart the Apache Tomcat 6 service.
11. Log In to the Geoportal
Your geoportal is now up and running.
Open a web browser and go to http://
localhost:8080/geoportal to access the
geoportal’s user interface. You can log in to
your geoportal with the gptuser user name
and gptuser password. You have logged in
successfully when a green banner saying
“Welcome gptuser” and the Administration
tab appear. Go to geoportal.sourceforge.net
for information on how to register resources
with your geoportal.
After adding an ArcGIS Server, synchronize it.
12. Register an ArcGIS Server
with the Geoportal Action. The page should reload, and a green banner should dis-
To register an ArcGIS Server and its associated services with your play the message “1 record(s) were updated”.
geoportal, use the following procedure. The ArcGIS Server can be 9. The fifth icon (Synchronize content) should now be in color; click
your own or one that is publicly available. (Note: ArcGIS Server is that icon. A dialog box entitled The page at localhost 8080 says…
not required to set up or manage a geoportal server. Esri Geoportal opens up. Click OK. A green banner that indicates one resource
Server supports a wide range of geospatial services, including OGC has been qualified for synchronization should appear. Wait a few
services [WMS, WCS, WFS, etc.], GeoRSS, ArcGIS services, Open moments while the geoportal synchronizes services from the reg-
Archive Initiative [OAI] services, and even web-accessible folders.) istered ArcGIS Server.
1. Log in to your geoportal. Click Administration. Click Add. Make 10. After a few moments, click the last icon (Show documents ac-
sure Register resource on the network is selected and click quired from this repository). The returned documents are meta-
Proceed. data records created for the services hosted on the registered
2. Select Protocol Type ArcGIS. ArcGIS Server and now discoverable through your geoportal.
3. In REST URL, type http://services.arcgisonline.com/
ArcGIS/rest/services/. Conclusion
4. In SOAP URL, type http://services.arcgisonline.com/ This tutorial walks through the process of setting up an Esri Geoportal
ArcGIS/services/. Server using an open source web servlet and database. For testing pur-
5. In title, type Services from ArcGIS Online. Click Test to poses, simple authentication was used, rather than LDAP authentica-
verify the connection. A green banner with “Connection success- tion. The full functionality of user-based roles in the Esri Geoportal
fully verified” should appear. Server requires an LDAP-enabled Directory Server. If an existing
6. Scroll down, keeping all other defaults, and click Save. A green Directory Server is not available, several open source directory servers
banner with Resource data saved successfully should appear. can be used. To learn more about configuring a Directory Server and
7. Click Manage at the top of the Administration tab. Services other aspects of installing and using the Esri Geoportal Server, see the
from ArcGIS Online should be listed. Notice that the fifth icon Geoportal Server 1.1 Installation Guide part of the documentation that
(Synchronize content) has been grayed out. is included with the Esri Geoportal Server download. Also see the Esri
8. Check the box to the left of the record. Above the records list, in Geoportal Server site at www.esriurl.com/geoportalserver.
For selected records, choose Set as Approved and click Execute
esri.com Summer 2011 au 57