Archive:4 4 3:Installing PostgreSQL

From SEPsesam
Revision as of 11:27, 5 September 2018 by Sta (talk | contribs) (Marked this version for translation)
Other languages:

Copyright © SEP AG 1999-2024. 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.

Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3/4.4.3 Grolar. For previous documentation version(s), check Documentation archive.


Overview

PostgreSQL database is required for 64-bit SEP sesam installations. Note that SEP sesam RPM packages already include PostgreSQL server package, however for some older SEP sesam versions, you may have to install the PostgreSQL manually as described below.

The database can be installed on different Linux-based distributions:

  • SLES
  • Debian/Ubuntu/UCS
  • RHEL/CentOS

For details on PostgreSQL backup or restore configuration, see PostgreSQL Backup and PostgreSQL Restore.

SLES-based distributions

The PostgreSQL database can be installed using YaST or other common command line tools (rug or zypper) on the SLES system. For details on the supported SLES versions, see SEP sesam OS and Database Support Matrix.

Installing with zypper

SLES includes the standard tool zypper which is common for package management. With this tool packages can be installed (and uninstalled) in the command line. The package name for the PostgreSQL database is postgresq1-server. The SEP sesam Server package includes all dependencies that are needed for standard SEP sesam Server installation.

To install the PostgreSQL database, use the following command:

kiwi:~ # zypper install postgresql-server

The installation is performed as shown in the output below:

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

The following new packages have been 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]

After successful installation, start the PostgreSQL instance:

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

Installing with YaST

It is possible to install the packages by using GUI. You can search for the package and select it by using YaST Package Search. Note that the YaST module is not available by default; the package yast2-packager-webpin must be installed first.

Debian-based distributions

For Debian-based distributions (Debian/Ubuntu/UCS) SEP provides signed Debian repositories for easier package installation, verification and update of the SEP sesam software. For details on Debian packages, see Debian Repository.

Installing with apt-get

Debian-based distribution (Debian/Ubuntu/UCS) includes the standard tool apt-get which is common for package management. With this tool packages can be installed (and uninstalled) in the command line.

The SEP sesam Server package includes all dependencies that are needed for standard SEP sesam Server installation. For details on the supported Debian-based versions, see SEP sesam OS and Database Support Matrix.

To install the PostgreSQL database, use the following command:

root@hostname#: apt-get install postgresql

The installation is performed as shown in the output below:

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#:
Information sign.png Note
Installing SEP sesam on Debian and Ubuntu requires additional steps. For details, see Debian Repository.

RHEL/CentOS-based distributions

Installing via yum package manager

Installing in RHEL- or CentOS-based distributions is similar as in SLES or Debian. All RHEL- and CentOS-based distributions include the standard tool yum which is common for package management. With this tool packages can be installed (and uninstalled) in the command line.

The SEP sesam Server package includes all dependencies that are needed for standard SEP sesam Server installation. For details on the supported RHEL/CentOS-based versions, see SEP sesam OS and Database Support Matrix.

To install the PostgreSQL database, use the following command:

# yum install postgresql-server

The installation is performed as shown in the output below:

[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!

Once the PostgreSQL is installed, you can install SEP sesam package. For details, see SEP sesam Quick Install Guide for Linux.