PostgreSQL setup en

From SEPsesam
Jump to: navigation, search

Copyright © SEP AG 1999-2014. All rights reserved.

Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.


Contents

Installing a PostgreSQL Database

A Postgre SQL database is needed for 64 Bit Sesam installations. This guide explains how to install this database software on various Linux Distributions.

SLES10/SLES11 and OpenSuSE based Distribtutions

The PostgreSQL database can be installed using Yast or other common command line tools (rug of zypper).

The prerequisite is an SLES i.e. OpenSuSE install CD.

Installing with zypper

OpenSuse as well as SLES10 or SLES11 include the tool "zypper" with which you can comfortably (de-)install packages in the command line.

The package name for the PostgreSQL database is "postgresq1-server". This program's installation includes all dependencies that are needed for SEP sesam. The installation is done like this:

kiwi:~ # zypper install postgresql-server
Loading files of the repository...
Reading installed packages...
Resolving package dependencies...

The following NEW packages are being installed:
  postgresql postgresql-libs postgresql-server 

Total size of the download: 4,1 M. After the operation an additional 7,1 M will be needed.
Continue? [YES/no]: YES
Package postgresql-libs-8.3.7-0.1.1.i586 is being called (1/3), 175,0 K (560,0 K installed)
Calling: postgresql-libs-8.3.7-0.1.1.i586.rpm [done]
Installing: postgresql-libs-8.3.7-0.1.1 [done]
Package postgresql-8.3.7-0.1.1.i586 is being called (2/3), 1023,0 K (4,2 M installed)
Calling: postgresql-8.3.7-0.1.1.i586.rpm [done]
Installing: postgresql-8.3.7-0.1.1 [done]
Package postgresql-server-8.3.7-0.1.1.i586 is being called (3/3), 3,0 M (12,4 M installed)
Calling: postgresql-server-8.3.7-0.1.1.i586.rpm [fertig (1,1 M/s)]
Installing: postgresql-server-8.3.7-0.1.1 [done]

Afterwards the PostgreSQL instance can be started once:

kiwi:~ # /etc/init.d/postgresql start
Initializing the PostgreSQL database at location /var/lib/pgsql/data    done 
Starting PostgreSQL                                                     done

Installing with YAST

You can also do the installation comfortably over the graphical interface. Searching and selecting the package is done via the Yast package search.

Installing on Debian based distributions (Debian/Ubuntu/UCS)

Debian based distributions automatically bring along according PostgreSQL packages over the online repositories and also on the install CDs.

Installing with apt-get

All Debian based distributions (Ubuntu, UCS) include the standard tool "apt-get" which is common for package management. With this tools packages can be installed and deinstalled comfortably in the command line.

The meta package "postgreSQL" includes all dependencies that are needed for a SEP sesam installation.

root@hostname#: apt-get install postgresql
Pckagelists are being read... Done
Dependency tree is being created       
Reading status information... Done
The following packages have been installed automatically and aren't needed any longer:
  libnm-util0 libpcsclite1 dhcdbd libpkcs11-helper1 libiw29 wpasupplicant libnl1 openvpn-blacklist
Use »apt-get autoremove« to remove them.
The following additional packages are being installed:
  postgresql-8.3 postgresql-client-8.3 postgresql-client-common postgresql-common
Recommended packages:
  oidentd ident-server postgresql-doc-8.3
The following NEW packages are being installed:
  postgresql postgresql-8.3 postgresql-client-8.3 postgresql-client-common postgresql-common
0 updated, 5 new installed, 0 to be removed and 53 not updated.
7257kB of archives have to be downloaded.
After this operation 19.6 MB of storage space are needed additionally.
Do you want to continue [Y/n]? Y
Getting:1 http://ftp.de.debian.org lenny/main postgresql-client-common 94lenny1 [46,8kB]
Getting:2 http://ftp.de.debian.org lenny/main postgresql-client-8.3 8.3.7-0lenny1 [1651kB]
Getting:3 http://ftp.de.debian.org lenny/main postgresql-common 94lenny1 [116kB]
Getting:4 http://ftp.de.debian.org lenny/main postgresql-8.3 8.3.7-0lenny1 [5208kB]
Getting:5 http://ftp.de.debian.org lenny/main postgresql 8.3.7-0lenny1 [235kB]
7257kB were downloaded in 4s (1686kB/s)
Vorkonfiguration der Pakete ...
Selecting previously deselected package postgresql-client-common.
(Reading database ... 96396 Files and directories are currently installed.)
Unpacking postgresql-client-common (from .../postgresql-client-common_94lenny1_all.deb) ...
Selecting previously deselected package postgresql-client-8.3.
Unpacking postgresql-client-8.3 (from .../postgresql-client-8.3_8.3.7-0lenny1_i386.deb) ...
Selecting previously deselected package postgresql-common.
Unpacking postgresql-common (from .../postgresql-common_94lenny1_all.deb) ...
Selecting previously deselected package postgresql-8.3.
Unpacking postgresql-8.3 (from .../postgresql-8.3_8.3.7-0lenny1_i386.deb) ...
Selecting previously deselected package postgresql.
Unpacking postgresql (from .../postgresql_8.3.7-0lenny1_all.deb) ...
Converting trigger for man-db ...
Setting up postgresql-client-common (94lenny1) ...
Setting up postgresql-client-8.3 (8.3.7-0lenny1) ...
Setting up postgresql-common (94lenny1) ...
supported_versions: WARNING: Unknown Debian release: 5.0.2
Adding user postgres to group ssl-cert
Setting up postgresql-8.3 (8.3.7-0lenny1) ...
Creating new cluster (configuration: /etc/postgresql/8.3/main, data: /var/lib/postgresql/8.3/main)...
Moving configuration file /var/lib/postgresql/8.3/main/postgresql.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_hba.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_ident.conf to /etc/postgresql/8.3/main...
Configuring postgresql.conf to use port 5432...
Starting PostgreSQL 8.3 database server: main.
Setting up postgresql 8.3.7-0lenny1) ...
root@hostname#:

Installing on RHEL / CentOS based distributions

Installing via "yum" package manager

Installing in RHEL or CentOS based distributions works the same as in SLES or Debian. Here too, the installation can be installed with the included tools. In RHEL i.e. CentOS the command line tool "yum" is used here:

[root@rhel5fix ~]# yum install postgresql-server
Loading "downloadonly" plugin
Loading "rhnplugin" plugin
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
rhel-i386-server-5        100% |=========================| 1.3 kB    00:00     
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 2.3 MB    00:02     
################################################## 6101/6101
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postgresql-server to pack into transaction set.
postgresql-server-8.1.11- 100% |=========================|  29 kB    00:00     
---> Package postgresql-server.i386 0:8.1.11-1.el5_1.1 set to be updated
--> Running transaction check
--> Processing Dependency: postgresql = 8.1.11-1.el5_1.1 for package: postgresql-server
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postgresql to pack into transaction set.
postgresql-8.1.11-1.el5_1 100% |=========================| 121 kB    00:00     
---> Package postgresql.i386 0:8.1.11-1.el5_1.1 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 postgresql-server       i386       8.1.11-1.el5_1.1  rhel-i386-server-5  3.9 M
Installing for dependencies:
 postgresql              i386       8.1.11-1.el5_1.1  rhel-i386-server-5  2.9 M

Transaction Summary
=============================================================================
Install      2 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         

Total download size: 6.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): postgresql-server- 100% |=========================| 3.9 MB    00:04     
(2/2): postgresql-8.1.11- 100% |=========================| 2.9 MB    00:03     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: postgresql                   ######################### [1/2] 
  Installing: postgresql-server            ######################### [2/2] 
Installed: postgresql-server.i386 0:8.1.11-1.el5_1.1
Dependency Installed: postgresql.i386 0:8.1.11-1.el5_1.1
Complete!
Personal tools
Namespaces
Variants
Actions
Navigation
Sesam
Toolbox