Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:adm:server_preparation_tmp [2020/07/24 08:05]
fiserp [Instalation and software configuration]
tutorial:adm:server_preparation_tmp [2020/07/24 08:25]
fiserp [PostgreSQL]
Line 46: Line 46:
  
 ===== PostgreSQL  ===== ===== PostgreSQL  =====
-<note tip>If you are install CzechIdM on Sql server, please follow [[tutorial:adm:mssql_database_support|this tutorial]].</note> +<note tip>If you are installing CzechIdM on Microsoft SQL Server, please follow [[tutorial:adm:mssql_database_support|this tutorial]].</note> 
-CentOS8 default repository version of PostgreSQL is 10 but IdM not support that version. In our tutorial, we will install newer version 12. Moreover, we install database data into /data not /var/lib which is the default option.+We install PostgreSQL 12 database binaries and change database data directory from ''/var/lib'' to ''/data''.
 ==== Database server installation - CentOS8 ==== ==== Database server installation - CentOS8 ====
   * Software installation on CentOS8(versions can vary):   * Software installation on CentOS8(versions can vary):
Line 53: Line 53:
 <code bash> <code bash>
 # enable module postgres 12 # enable module postgres 12
-yum module enable postgresql:12 +dnf module enable postgresql:12 
-yum install -y postgresql-server postgresql-contrib postgresql-libs+dnf -y install postgresql-server postgresql-contrib postgresql-libs
 </code> </code>
  
-  * create new system directory:+  * create new directory for database data:
  
 <code bash> <code bash>
-mkdir -p /data/pgsql/12/data/ 
 mkdir -p /data/pgsql/12/data/ mkdir -p /data/pgsql/12/data/
 chown -R postgres:postgres /data/pgsql/ chown -R postgres:postgres /data/pgsql/
Line 66: Line 65:
 </code> </code>
  
-  * Copy of the configuration file for systemd, in which we will make change of directory for data:+  * Copy the PostgreSQL'systemd unit to the /etc:
  
 <code bash> <code bash>
Line 78: Line 77:
 </code> </code>
  
-  * In the file ''~postgres/.bash_profile'' change the variable PGDATA value to:+  * In the file ''/var/lib/pgsql/.bash_profile'' (bash profile for postgres user) change the variable PGDATA to:
  
 <code> <code>
Line 95: Line 94:
  
 <code bash> <code bash>
-/usr/bin/postgresql-setup --initdb --unit postgresql+postgresql-setup --initdb --unit postgresql
 </code> </code>