Differences

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

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
tutorial:adm:server_preparation_tmp [2020/03/10 09:55]
urbanl created
tutorial:adm:server_preparation_tmp [2020/03/11 08:22]
urbanl [PostgreSQL]
Line 45: Line 45:
 </code> </code>
  
 +-!CHANGED
 When installing to centos8, check and install these packages: When installing to centos8, check and install these packages:
 <code> <code>
 +# check installed packages. It's recommanded to have them installed.
 yum list installed  net-tools nano wget  vim-enhanced bzip2 bash-completion lsof zip unzip psmisc policycoreutils-python-utils yum list installed  net-tools nano wget  vim-enhanced bzip2 bash-completion lsof zip unzip psmisc policycoreutils-python-utils
-yum install -y mc haveged nmap screen sysstat telnet OpenSMTPD+# other recommended packages installation 
 +yum install -y mc haveged nmap screen sysstat telnet
 </code> </code>
  
Line 57: Line 60:
 ===== 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 install CzechIdM on Sql server, please follow [[tutorial:adm:mssql_database_support|this tutorial]].</note>
-CentOS7 default repository version of PostgreSQL is 9.2 but IdM not support that version. In our tutorial, we will install newer version 9.6. Moreover, we install database data into /data not /var/lib which is the default option. +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. 
-==== Database server installation - CentOS7 ==== +==== Database server installation - CentOS7 and CentOS8 -!CHANGED ==== 
-  * Software installation (versions can vary):+  * Software installation on CentOS7(versions can vary):
 <code bash> <code bash>
 yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm yum install -y https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm
 yum install -y postgresql96-server postgresql96-contrib pgstat2_96 pg_top96  postgresql96-libs yum install -y postgresql96-server postgresql96-contrib pgstat2_96 pg_top96  postgresql96-libs
 </code> </code>
 +  * Software installation on CentOS8(versions can vary):
 +
 +<code bash>
 +# enable module postgres 12
 +yum module enable postgresql:12
 +yum install -y postgresql-server postgresql-contrib postgresql-libs
 +</code>
 +
   * create new system directory:   * create new system directory:
-<code> + 
-mkdir -p /data/pgsql/9.6/data/+<code bash
 +mkdir -p /data/pgsql/11/data/
 chown -R postgres:postgres /data/pgsql/ chown -R postgres:postgres /data/pgsql/
 chmod 700 /data/pgsql chmod 700 /data/pgsql
 </code> </code>
 +
   * Copy of the configuration file for systemd, in which we will make change of directory for data:   * Copy of the configuration file for systemd, in which we will make change of directory for data:
 +
 <code bash> <code bash>
-cp /usr/lib/systemd/system/postgresql-9.6.service /etc/systemd/system/+cp /usr/lib/systemd/system/postgresql-11.service /etc/systemd/system/
 </code> </code>
-In the file ''/etc/systemd/system/postgresql-9.6.service'' change the directory for data as follows:+ 
 +In the file ''/etc/systemd/system/postgresql-11.service'' change the directory for data as follows:
 <code> <code>
 # Location of database directory # Location of database directory
Line 83: Line 98:
  
 <code> <code>
-PGDATA=/data/pgsql/9.6/data+PGDATA=/data/pgsql/11/data
 </code> </code>
  
Line 97: Line 112:
  
 <code bash> <code bash>
-/usr/pgsql-9.6/bin/postgresql96-setup initdb+/usr/pgsql-11/bin/postgresql96-setup initdb
 </code> </code>
  
Line 105: Line 120:
  
 <code bash> <code bash>
-systemctl start postgresql-9.6.service +systemctl start postgresql-11.service 
-systemctl enable postgresql-9.6.service+systemctl enable postgresql-11.service
 </code> </code>