Install PostgreSQL 9.1.2
Pages 202
- Home
- 2009 Esri Federal UC
- 2009 Esri International UC
- 2010 Esri Federal UC
- 2010 Esri International UC
- 2011 Esri Federal UC
- 2012 Esri Federal UC
- 2013 Esri Federal GIS Conference
- 2013 Esri International User Conference
- 2015 SDI Special Interest Group
- Add a Custom Profile
- Add an OpenSearch endpoint for Federated Search
- Add Another Tab to the Geoportal Interface
- Add Custom Link to a Search Result
- Add Custom Search Criteria
- Add the Geoportal Search to a List of Search Providers
- Add v1.1.1 FGDC editor to a previous Geoportal release
- AGP TO AGP Harvesting with the Geoportal
- AGS TO AGP Harvesting with the Geoportal
- All gpt.xml file settings
- An Introduction to vi
- Apache Tomcat geoportal logging
- Being a Good Robot
- Best Practice for Edits to JSP files
- Biological or Remote Sensing FGDC xsds
- Browse Tree
- Cart Processor
- Catalog Service
- Clear the Tomcat Work Folder
- Collections
- Common problems and solutions
- Communities and live examples
- Components
- Configure a Directory Server for the Geoportal
- Configure geoportal User and Schema in the PostgreSQL Database
- Configure Previewable Filetypes
- Configure Searching of YouTube
- Configure the gpt.xml File
- Configure Widgets
- Connecting to a User Directory
- Create a user account
- Create Relationships between Resources
- Customizations
- Customize DCAT output
- Customize Metadata Validation
- Database problems
- Database Tables
- DataDownload Tab
- Deploy and Configure the Geoportal Web Application in Tomcat
- Deploy and Configure the Servlet Web Application
- Deploy the Geoportal Web Application
- Details of Lucene Indexing in the Geoportal
- Development topics
- Discovering Resources
- Eclipse Project from Compiled WAR
- Eclipse Project from Source Code
- Enable Search Using an Ontology Service
- Error Messages in the Geoportal Web Application
- Esri Geoportal Server LiveDVD
- Extending the Web Harvester
- Federated Search in Portal for ArcGIS
- Feedback
- FGDC Biological Profile and Remote Sensing Extension
- FGDC Service Checker Integration
- Geoportal Clients for ArcGIS
- Geoportal CSW Clients
- Geoportal Facets using Apache Solr
- Geoportal genie
- Geoportal Project from Compiled WAR
- Geoportal Publish Client
- Geoportal Server 1.2.5 What's New
- Geoportal Server 1.2.6 What's New
- Geoportal Server 1.2.7 What's New
- Geoportal server as a broker
- Geoportal Server Downloads
- Geoportal Server v 1.0 What's New
- Geoportal Server v 1.1 What's New
- Geoportal Server v 1.1.1 What's New
- Geoportal Server v 1.2 What's New
- Geoportal Server v 1.2.2 What's New
- Geoportal Server v 1.2.4 What's New
- Geoportal SPARQL Sample
- Geoportal User Interface Components
- Geoportal Web Application File Organization
- Geoportal XML Editor
- Get Assistance with an Implementation
- GXE Concepts
- GXE Crash Course
- GXE Structure
- GXE Workflow
- High Availability and Large Number of Records
- How to Browse for Resources
- How to Create and Manage My Profile
- How to find all documents of a particular metadata standard
- How to Leave a Resource Review
- How to Login and Manage my Password
- How to Manage and Edit Resources
- How to Publish Resources
- How to Restrict Access to Resources
- How to Search for Resources
- How to Search with an Ontology Service
- How to Set Up an Esri Geoportal Server on Linux
- How to Use Search Page Results
- How to Use the Data Download Feature
- How to View Resource Relationships
- IDE Topics
- Identity Components LDAP and Single Sign On
- Index All Metadata Content
- Indexing and Searching the Time Period of the Content
- Install Apache Tomcat 6
- Install Desktop Tools
- Install Esri Geoportal Server
- Install PostgreSQL 9.1.2
- Install the JDBC .jar Files
- Installation
- Installation Version 1.0
- Installation Version 1.1
- Installation Version 1.2
- Installation Version 1.2.2
- Installation Version 1.2.4
- Installation Version 1.2.5
- Installation Version 1.2.6
- Installation Version 1.2.7
- Installation Version 1.2.8
- Integrate with a Content Management System
- Integrate with the con terra Security Solution
- Localization
- Log In to the Geoportal
- Logging
- Look and Feel of the User Interface
- Main Page
- Map LDAP Attributes on the Registration Page
- Map Viewer
- Online form editing for all publication methods
- Open source acknowledgements
- Oracle WebLogic geoportal logging
- Orientation to the Create Metadata Page
- Perform Preinstallation Computer Setup
- Portal for ArcGIS Integration
- Post Deployment Actions
- Preinstallation
- Preinstallation 0.9
- Preinstallation 1.0 and 1.1.x
- Preinstallation 1.2
- Preinstallation 1.2.2
- Preinstallation 1.2.4
- Preinstallation 1.2.5
- Preinstallation 1.2.6
- Preinstallation 1.2.7
- Preinstallation 1.2.8
- Preview Function
- Publication Components
- Ratings and Comments for Search Results
- Register ArcGIS for Server with the Geoportal
- Release notes
- REST API Syntax
- Sample FGDC metadata.xml
- Scheduled tasks
- Search Components
- Search Map
- Search Widget for Flex
- Search Widget for HTML
- Search Widget for Silverlight
- Security Concepts
- Set Up Systemwide Environment Variables
- Set up the Geoportal Database
- Share Link
- Single Sign On
- Smoketest the Geoportal
- Standards Support
- Supported CSW Profiles for Synchronization
- Theme Library
- Troubleshooting
- Troubleshooting Tips
- Two geoportals on the same server
- Upgrade 1.x to 1.2 database
- Upgrading file system approach
- Upgrading Read This Overview
- Upgrading SVN approach
- Url filter customization
- Use an XSLT to Render the Details Page
- Use Ant to build Geoportal
- User Functions and Roles
- User Management Interface
- Using a geoportal
- Using Lucene Search Text Queries
- Version 0.9
- Version 1.0
- Version 1.1
- Version 1.1.1
- Version 1.2
- Version 1.2.2
- Version 1.2.4
- Version 1.2.5
- Version 1.2.6
- Version 1.2.7
- Version 1.2.8
- What is a geoportal and the geoportal server
- What is the esri geoportal server
- What's New
- wiki template
- WMC Client
- Show 187 more pages…
Clone this wiki locally
The PostgreSQL database will store the users, resource metadata, and harvesting schedule information for the geoportal. You will install PostgreSQL from its source code instead of installing it from your distribution's online repositories. This requires a little more effort in the installation but greatly simplifies the management of PostgreSQL as well as this tutorial.
Download PostgreSQL
Change to the /usr/local/etc directory. Download the PostgreSQL source code to this directory by entering the following:
-
$ sudo wget ftp://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.gz
The .tar.gz file format is how most files are packaged and compressed in Linux. It is basically the Linux version of the .zip format. Extract the .tar.gz file by entering the following:
-
$ sudo tar zxvf postgresql-9.1.2.tar.gz
The contents of the .tar.gz file will automatically be extracted to a new postgresql-9.1.2 directory within the /usr/local/etc directory.
Install PostgreSQL
You will now install PostgreSQL from the source code. It is a three-step process. First, you'll prepare your computer and the source code. Next, you'll compile the source code into the full program. Finally, you'll install the compiled program. Don't worry; it's a lot easier than it sounds.
Note: This may seem unnecessarily complicated. Why not use just one command? This process allows advanced users of Linux to highly customize the installation of software to their system. It epitomizes the spirit of open source software, giving users control over the software they install on their computers instead of the other way around.
Change to the new postgresql-9.1.2 directory.
-
$ cd /usr/local/etc/postgresql-9.1.2
The PostgreSQL source code includes a script that automatically prepares your computer and the source code for compiling.
-
$ ./configure
Next, compile the source code for installation.
-
$ make
Finally, you can install PostgreSQL
-
$ sudo make install
Note: The sudo command is required for the last step because this step is where you're making actual changes to the operation of the computer. The ./configure script and make command, while required for installing software from the source onto Linux, do not actually cause any changes to the operation of the computer.
Create the postgres User
For database security and integrity, you will create the postgres user for the PostgreSQL application. It will act like the Linux root user but only for the PostgreSQL database. Create the user like you created the geoportal user, but do not make it a member of the wheel or sudo group.
Create the Directory for PostgreSQL Data
In this step, you will create the directory where all the data stored in the PostgreSQL database will be stored. You will then make the postgres user the owner of this directory.
Change to the newly created /usr/local/pgsql directory. This is where PostgreSQL was installed.
-
$ cd /usr/local/pgsql
Create the data directory.
-
$ sudo mkdir /usr/local/pgsql/data
Change ownership of this directory to the postgres user.
-
$ sudo chown postgres:postgres /usr/local/pgsql/data
Now reboot your computer so all the changes that you have made so far take effect.
-
$ sudo reboot
Initialize and Start the PostgreSQL Server
Log back in to your computer, reopen the terminal, and switch to the postgres user.
-
$ su postgres
Now initialize the PostgreSQL database by entering the following:
-
$ pg_ctl initdb
Now start up the PostgreSQL database server by entering the following:
-
$ pg_ctl start
You may have to press Enter to return to the command line.
Set Up Autostart on Boot for PostgreSQL
This step will prevent you from having to start up the PostgreSQL database server manually every time you reboot the machine.
First, switch back to the geoportal user.
-
$ su geoportal
Configuring autostart on boot depends heavily on which distribution of Linux you are using. Fortunately, PostgreSQL makes it easy by providing a startup script that works with most distributions of Linux.
| Arch Linux and Related |
|---|
First, copy the PostgreSQL startup script to the /etc/rc.d directory.
root user.
rc.conf in vi for editing.
postgresql to the daemons list.
|
| Debian, Ubuntu, and Related |
|---|
First, copy the PostgreSQL startup script to the /etc/init.d directory.
root user.
postgresql script to the startup sequence.
|
| Fedora, CentOS, and Related |
|---|
First, copy the PostgreSQL startup script to the /etc/init.d directory.
root user.
chkconfig to add the script to the startup sequence.
|
Verify Autostart on Boot
After rebooting the system, reopen the terminal and switch to the postgres user. Change to the /usr/local/ directory and enter the following:
-
$ pg_ctl status
It will tell you that the PostgreSQL database server is running or not. If not, verify that the start script was initialized correctly.
Next Step: Install Apache Tomcat 6
<<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>>