Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:adm:server_preparation_tmp [2020/03/10 15:08] urbanl [TODO] |
tutorial:adm:server_preparation_tmp [2020/03/11 09:50] urbanl [Database server installation - CentOS8 -!CHANGED] |
||
---|---|---|---|
Line 58: | Line 58: | ||
screen dnsutils sysstat lsof haveged nmap tcpdump traceroute tcptraceroute curl iptables-persistent | screen dnsutils sysstat lsof haveged nmap tcpdump traceroute tcptraceroute curl iptables-persistent | ||
</ | </ | ||
- | ===== PostgreSQL ===== | + | ===== PostgreSQL |
<note tip>If you are install CzechIdM on Sql server, please follow [[tutorial: | <note tip>If you are install CzechIdM on Sql server, please follow [[tutorial: | ||
- | CentOS7 | + | CentOS8 |
- | ==== Database server installation - CentOS7 and CentOS8 -!CHANGED ==== | + | ==== Database server installation - CentOS8 -!CHANGED ==== |
- | * Software installation on CentOS7(versions can vary): | + | |
- | <code bash> | + | |
- | yum install -y https:// | + | |
- | yum install -y postgresql96-server postgresql96-contrib pgstat2_96 pg_top96 | + | |
- | </ | + | |
- | #TODO | + | |
* Software installation on CentOS8(versions can vary): | * Software installation on CentOS8(versions can vary): | ||
+ | |||
<code bash> | <code bash> | ||
# enable module postgres 12 | # enable module postgres 12 | ||
Line 77: | Line 72: | ||
* create new system directory: | * create new system directory: | ||
- | < | + | < |
- | mkdir -p / | + | mkdir -p / |
+ | mkdir -p / | ||
chown -R postgres: | chown -R postgres: | ||
chmod 700 /data/pgsql | chmod 700 /data/pgsql | ||
Line 84: | Line 80: | ||
* 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 / | + | cp / |
</ | </ | ||
- | In the file ''/ | + | |
+ | In the file ''/ | ||
< | < | ||
# Location of database directory | # Location of database directory | ||
- | Environment=PGDATA=/ | + | Environment=PGDATA=/ |
</ | </ | ||
Line 96: | Line 94: | ||
< | < | ||
- | PGDATA=/ | + | PGDATA=/ |
</ | </ | ||
Line 110: | Line 108: | ||
<code bash> | <code bash> | ||
- | /usr/pgsql-11/bin/postgresql96-setup initdb | + | /usr/bin/postgresql-setup |
</ | </ | ||
+ | Change SELINUX labels: | ||
+ | < | ||
+ | chcon -Rt postgresql_db_t pgsql/ | ||
+ | chcon -Rt postgresql_log_t / | ||
+ | </ | ||
* Enable and start database: | * Enable and start database: | ||
<code bash> | <code bash> | ||
- | systemctl start postgresql-11.service | + | systemctl start postgresql.service |
- | systemctl enable postgresql-11.service | + | systemctl enable postgresql.service |
</ | </ | ||
Line 125: | Line 127: | ||
<code bash> | <code bash> | ||
- | [root@tomcat1 system]# systemctl status postgresql-9.6.service -l | + | [root@HOSTNAME data]# systemctl status postgresql.service -l |
- | ● postgresql-9.6.service - PostgreSQL | + | ● postgresql.service - PostgreSQL database server |
- | | + | |
- | | + | |
- | Main PID: 2626 (postmaster) | + | Main PID: 25715 (postmaster) |
- | | + | Tasks: 8 (limit: 52428) |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | └─2634 postgres: stats collector | + | |
+ | | ||
+ | ├─25722 postgres: stats collector | ||
+ | | ||
- | lis 18 23:50:06 tomcat1.localdomain | + | Mar 11 10:48:06 HOSTNAME |
- | lis 18 23:50:06 tomcat1.localdomain | + | Mar 11 10:48:06 HOSTNAME postmaster[25715]: |
- | lis 18 23:50:06 tomcat1.localdomain | + | Mar 11 10:48:06 HOSTNAME |
- | lis 18 23:50:06 tomcat1.localdomain | + | Mar 11 10:48:06 HOSTNAME postmaster[25715]: |
+ | Mar 11 10:48:06 HOSTNAME postmaster[25715]: | ||
+ | Mar 11 10:48:06 HOSTNAME postmaster[25715]: | ||
+ | Mar 11 10:48:06 HOSTNAME postmaster[25715]: | ||
+ | Mar 11 10:48:06 HOSTNAME | ||
+ | Mar 11 10:48:06 HOSTNAME | ||
</ | </ | ||