-
Notifications
You must be signed in to change notification settings - Fork 149
Configure geoportal User and Schema in the PostgreSQL Database
In this step, you will prepare the PostgreSQL database to work with Geoportal Server. First, you will create the geoportal
user and schema within the database and then populate the schema with necessary tables.
Change to the Database Scripts
directory in the geoportal
directory.
-
$ cd /usr/local/etc/geoportal/Database\ Scripts
Change ownership and executability of scripts within the PostgreSQL
directory.
-
$ sudo chown -R postgres:postgres /usr/local/etc/geoportal/Database\ Scripts/PostgreSQL
-
$ sudo chmod -R +x /usr/local/etc/geoportal/Database\ Scripts/PostgreSQL
Change to the PostgreSQL
directory and verify changes.
-
$ cd /usr/local/etc/geoportal/Database\ Scripts/PostgreSQL
-
$ ls -l
Switch to the postgres
user.
-
$ su postgres
Type ./grants_linuxpg.sh
to see the usage instruction for this script; follow these instructions to execute this script.
Type the following parameters and press Enter; you will be prompted to create a password for the geoportal
user.
-
$ ./grants_linuxpg.sh localhost 5432 postgres geoportal postgres geoportal
Note: This is not the same user as your geoportal
login for Linux. This geoportal
user is within the PostgreSQL database.
The next script takes the geoportal schema that you just created and populates it with the tables that Geoportal Server needs to operate.
Type ./create_schema_linuxpg.sh
to see the usage instructions for this script.
Execute the script by entering the following:
-
$ ./create_schema_linuxpg.sh localhost 5432 postgres geoportal
For the geoportal
user, enter the password you just created when running the ./grants_linuxpg.sh
scipt; this geoportal user is the PostgreSQL
user, not your Linux login user.
The following section uses the PostgreSQL command line to interact with and query the PostgreSQL database. Remain as the PostgreSQL
user for this section.
Enter the PostgreSQL command line.
-
$ psql
Query the database for all schemas. You should see public and geoportal schemas.
-
postgres=# \dn
Query for a list of the items within the geoportal schema.
-
postgres=# \dtvs geoportal.*
You should see the following table:
Exit the PostgreSQL command line.
-
postgres=# \q
Switch back to the geoportal
user.
-
$ su geoportal
Next Step: Deploy the Geoportal Web Application
<<How to Set Up an Esri Geoportal Server on Linux | Perform Preinstallation Computer Setup | Set Up Systemwide Environment Variables | Install PostgreSQL 9.1.2 | Install Apache Tomcat 6 | Install Esri Geoportal Server | Configure geoportal User and Schema in the PostgreSQL Database | Deploy the Geoportal Web Application | Configure the gpt.xml File | Install the JDBC .jar Files | Log In to the Geoportal | Register ArcGIS for Server with the Geoportal>>