Difference: SCSArchiverCSStudioPostgresInstallationSuse (r3 vs. r2)

SCSArchiver CSStudio Postgres Installation Suse

Installation
install
As root
zypper install postgresql postgresql-jdbc postgresql-server 
Results in ...

 Loading repository data...
 Reading installed packages...
 Resolving package dependencies...
 
 The following 7 NEW packages are going to be installed:
 libpq5 postgresql postgresql94 postgresql94-server postgresql-init postgresql-jdbc postgresql-server
 
 7 new packages to install.
 Overall download size: 5.2 MiB. Already cached: 0 B. After the operation, additional 21.8 MiB will be used.
 Continue? [y/n/? shows all options] (y): y
 Retrieving package postgresql jdbc-9.4-3.2.noarch (1/7), 587.9 KiB (617.4 KiB unpacked)
 Retrieving: postgresql-jdbc-9.4-3.2.noarch.rpm ......................................................[done]
 Retrieving package libpq5-9.4.6-4.1.x86_64                            (2/7), 159.5 KiB (464.6 KiB unpacked)
 Retrieving: libpq5-9.4.6-4.1.x86_64.rpm .................................................[done (3.2 MiB/s)]
 Retrieving package postgresql-init-9.4-6.1.noarch                     (3/7),  11.0 KiB (  7.5 KiB unpacked)
 Retrieving: postgresql-init-9.4-6.1.noarch.rpm ......................................................[done]
 Retrieving package postgresql94-9.4.6-4.1.x86_64                      (4/7),   1.1 MiB (  4.2 MiB unpacked)
 Retrieving: postgresql94-9.4.6-4.1.x86_64.rpm .......................................................[done]
 Retrieving package postgresql94-server-9.4.6-4.1.x86_64               (5/7),   3.4 MiB ( 16.6 MiB unpacked)
 Retrieving: postgresql94-server-9.4.6-4.1.x86_64.rpm ....................................[done (6.6 MiB/s)]
 Retrieving package postgresql-9.4-1.1.noarch                          (6/7),   3.8 KiB (   83   B unpacked)
 Retrieving: postgresql-9.4-1.1.noarch.rpm ...........................................................[done]
 Retrieving package postgresql-server-9.4-1.1.noarch                   (7/7),   3.8 KiB (   83   B unpacked)
 Retrieving: postgresql-server-9.4-1.1.noarch.rpm ....................................................[done]
 Checking for file conflicts: ........................................................................[done]
 (1/7) Installing: postgresql-jdbc-9.4-3.2.noarch ....................................................[done]
 (2/7) Installing: libpq5-9.4.6-4.1.x86_64 ...........................................................[done]
 (3/7) Installing: postgresql-init-9.4-6.1.noarch ....................................................[done]
 Additional rpm output:
 Updating /etc/sysconfig/postgresql...
 			 
 (4/7) Installing: postgresql94-9.4.6-4.1.x86_64 .....................................................[done]
 (5/7) Installing: postgresql94-server-9.4.6-4.1.x86_64 ..............................................[done]
 (6/7) Installing: postgresql-9.4-1.1.noarch .........................................................[done]
 (7/7) Installing: postgresql-server-9.4-1.1.noarch ..................................................[done]
Then create the data directory:
mkdir -p /data/postgresql/9.4/data && 
chown postgres /data/postgresql/9.4/data
And change to user postgres
su - postgres 
Initialize Database Directory:
initdb -D /data/postgresql/9.4/data/ 
Results in ...

 The files belonging to this database system will be owned by user "postgres".
 This user must also own the server process.
 
 The database cluster will be initialized with locale "en_US.UTF-8".
 The default database encoding has accordingly been set to "UTF8".
 The default text search configuration will be set to "english".
 
 Data page checksums are disabled.
 
 fixing permissions on existing directory /data/postgresql/9.4/data ... ok
 creating subdirectories ... ok
 selecting default max_connections ... 100
 selecting default shared_buffers ... 128MB
 selecting dynamic shared memory implementation ... posix
 creating configuration files ... ok
 creating template1 database in /data/postgresql/9.4/data/base/1 ... ok
 initializing pg_authid ... ok
 initializing dependencies ... ok
 creating system views ... ok
 loading system objects' descriptions ... ok
 creating collations ... ok
 creating conversions ... ok
 creating dictionaries ... ok
 setting privileges on built-in objects ... ok
 creating information schema ... ok
 loading PL/pgSQL server-side language ... ok
 vacuuming database template1 ... ok
 copying template1 to template0 ... ok
 copying template1 to postgres ... ok
 syncing data to disk ... ok
 
 WARNING: enabling "trust" authentication for local connections
 You can change this by editing pg_hba.conf or using the option -A, or
 --auth-local and --auth-host, the next time you run initdb.
 
 Success. You can now start the database server using:
 
     postgres -D /data/postgresql/9.4/data
Exit back to superuser root:
exit 
Check and set boot option of service postgresql
chkconfig -l postgresql
postgresql                0:off  1:off  2:off  3:off  4:off  5:off  6:off
chkconfig postgresql on &&
chkconfig -l postgresql

postgresql                0:off  1:off  2:off  3:on   4:off  5:on   6:off
Edit /etc/sysconfig/postgresql
vi /etc/sysconfig/postgresql

Set POSTGRES_DATADIR
 #POSTGRES_DATADIR="~postgres/data"
 POSTGRES_DATADIR="/data/postgresql/9.4/data"
Change to user postgres ...
su - postgres 
... and edit the configuration file postgresql.conf:
  • listen_addresses
export PGDATA=/data/postgresql/9.4/data/ &&
vi $PGDATA/postgresql.conf

 #------------------------------------------------------------------------------
 # CONNECTIONS AND AUTHENTICATION
 #------------------------------------------------------------------------------
 
 # - Connection Settings -
 
 #listen_addresses = 'localhost'         # what IP address(es) to listen on;
 listen_addresses = '*'                  # what IP address(es) to listen on;
... followed by an edit of the file pg_hba.conf:
$PGDATA/pg_hba.conf 

hostnossl archive archiver .gsi.de trust hostnossl archive report .gsi.de trust #hostnossl all all 192.168.*/16 hostnossl archive archiver 10.203.0.0/16 trust hostnossl archive report 10.203.0.0/16 trust 
Back to superuser root:
exit 
Start postgresql as a service
service postgresql start 
Become again user postgres
su - postgres 
create test db and connect to it
createdb test &&
psql test


-- PeterZumbruch - 14 Jun 2016


-- PeterZumbruch - 16 Jun 2016

View topic | View difference side by side | History: r3 < r2 < r1 | More topic actions
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Hades Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)