Skip to content

Commit 4daedf9

Browse files
Create the Greenplum 7 README for Rocky8 to build OSS GPDB (#15329)
Authored-by : Mounika M <[email protected]>
1 parent 5a73092 commit 4daedf9

File tree

3 files changed

+114
-118
lines changed

3 files changed

+114
-118
lines changed

README.CentOS.bash

-63
This file was deleted.

README.Linux.md

+11-55
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,14 @@
1-
## For CentOS:
2-
3-
- Install Dependencies
4-
5-
```bash
6-
./README.CentOS.bash
7-
```
8-
9-
- If you want to link cmake3 to cmake, run:
10-
11-
```bash
12-
sudo ln -sf /usr/bin/cmake3 /usr/local/bin/cmake
13-
```
14-
15-
- Make sure that you add `/usr/local/lib` and `/usr/local/lib64` to
16-
`/etc/ld.so.conf`, then run command `ldconfig`.
17-
18-
- If you want to install and use gcc-7 by default, run:
19-
20-
```bash
21-
sudo yum install -y centos-release-scl
22-
sudo yum install -y devtoolset-7-toolchain
23-
echo 'source scl_source enable devtoolset-7' >> ~/.bashrc
24-
```
25-
26-
## For RHEL:
27-
28-
- Install Development Tools.
29-
- For RHEL 8: Install `Development Tools`:
30-
31-
```bash
32-
sudo yum group install -y "Development Tools"
33-
```
34-
35-
- For RHEL versions (< 8.0): Install `devtoolset-7`:
36-
37-
```bash
38-
sudo yum-config-manager --enable rhui-REGION-rhel-server-rhscl
39-
sudo yum install -y devtoolset-7-toolchain
40-
```
41-
42-
- Install dependencies using README.CentOS.bash script.
43-
- For RHEL 8: Execute additional step before running README.CentOS.bash script.
44-
45-
Note: Make sure installation of `Development Tools` includes `git` and `make` else install these tools manually.
46-
47-
```bash
48-
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
49-
```
50-
51-
- Install dependencies using README.CentOS.bash script.
52-
53-
```bash
54-
./README.CentOS.bash
55-
```
1+
## For RHEL/Rocky8:
2+
3+
- For EL versions (> 8.0):
4+
- Install git
5+
```bash
6+
sudo yum install git
7+
```
8+
- Install dependencies using README.Rhel-Rocky.bash script.
9+
```bash
10+
./README.Rhel-Rocky.bash
11+
```
5612

5713
## For Ubuntu:
5814

README.Rhel-Rocky.bash

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
#!/bin/bash
2+
3+
# Install needed packages. Please add to this list if you discover additional prerequisites
4+
sudo yum group install -y "Development Tools"
5+
INSTALL_PKGS="apr-devel bison bzip2-devel cmake3 epel-release flex gcc gcc-c++ krb5-devel libcurl-devel libevent-devel libkadm5 libxml2-devel libzstd-devel openssl-devel python39 python39-devel python39-psutil python3-pip perl-ExtUtils-MakeMaker.noarch perl-ExtUtils-Embed.noarch readline-devel rsync xerces-c-devel zlib-devel"
6+
7+
for i in $INSTALL_PKGS; do
8+
sudo yum install -y $i
9+
done
10+
11+
# Needed for pygresql, or you can source greenplum_path.sh after compiling database and installing python-dependencies then
12+
sudo yum install -y postgresql
13+
sudo yum install -y postgresql-devel
14+
15+
pip3.9 install pygresql
16+
pip3.9 install -r python-dependencies.txt
17+
18+
#Remove the python3 softlink because on Rocky8 its pointing to python3.6 by default. We need python3.9 for gpdb7.
19+
sudo rm -rf /usr/bin/python3
20+
sudo ln -s /usr/bin/python3.9 /usr/bin/python3
21+
22+
#For all Greenplum Database host systems running RHEL, CentOs or Rocky8, SELinux must either be Disabled or configured to allow unconfined access to Greenplum processes, directories, and the gpadmin user.
23+
setenforce 0
24+
sudo tee -a /etc/selinux/config << EOF
25+
SELINUX=disabled
26+
EOF
27+
28+
#To prevent SELinux-related SSH authentication denials that could occur even with SELinux deactivated
29+
sudo tee -a /etc/sssd/sssd.conf << EOF
30+
selinux_provider=none
31+
EOF
32+
33+
sudo systemctl stop firewalld.service
34+
35+
#Configure kernel settings so the system is optimized for Greenplum Database.
36+
sudo tee -a /etc/sysctl.d/10-gpdb.conf << EOF
37+
kernel.msgmax = 65536
38+
kernel.msgmnb = 65536
39+
kernel.msgmni = 2048
40+
kernel.sem = 500 2048000 200 8192
41+
kernel.shmmni = 1024
42+
kernel.core_uses_pid = 1
43+
kernel.core_pattern=/var/core/core.%h.%t
44+
kernel.sysrq = 1
45+
net.core.netdev_max_backlog = 2000
46+
net.core.rmem_max = 4194304
47+
net.core.wmem_max = 4194304
48+
net.core.rmem_default = 4194304
49+
net.core.wmem_default = 4194304
50+
net.ipv4.tcp_rmem = 4096 4224000 16777216
51+
net.ipv4.tcp_wmem = 4096 4224000 16777216
52+
net.core.optmem_max = 4194304
53+
net.core.somaxconn = 10000
54+
net.ipv4.ip_forward = 0
55+
net.ipv4.tcp_congestion_control = cubic
56+
net.ipv4.tcp_tw_recycle = 0
57+
net.core.default_qdisc = fq_codel
58+
net.ipv4.tcp_mtu_probing = 0
59+
net.ipv4.conf.all.arp_filter = 1
60+
net.ipv4.conf.default.accept_source_route = 0
61+
net.ipv4.ip_local_port_range = 10000 65535
62+
net.ipv4.tcp_max_syn_backlog = 4096
63+
net.ipv4.tcp_syncookies = 1
64+
net.ipv4.ipfrag_high_thresh = 41943040
65+
net.ipv4.ipfrag_low_thresh = 31457280
66+
net.ipv4.ipfrag_time = 60
67+
net.ipv4.ip_local_reserved_ports=65330
68+
vm.overcommit_memory = 2
69+
vm.overcommit_ratio = 95
70+
vm.swappiness = 10
71+
vm.dirty_expire_centisecs = 500
72+
vm.dirty_writeback_centisecs = 100
73+
vm.zone_reclaim_mode = 0
74+
EOF
75+
76+
RAM_IN_KB=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
77+
RAM_IN_BYTES=$(($RAM_IN_KB*1024))
78+
echo "vm.min_free_kbytes = $(($RAM_IN_BYTES*3/100/1024))" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
79+
echo "kernel.shmall = $(($RAM_IN_BYTES/2/4096))" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
80+
echo "kernel.shmmax = $(($RAM_IN_BYTES/2))" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
81+
if [ $RAM_IN_BYTES -le $((64*1024*1024*1024)) ]; then
82+
echo "vm.dirty_background_ratio = 3" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
83+
echo "vm.dirty_ratio = 10" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
84+
else
85+
echo "vm.dirty_background_ratio = 0" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
86+
echo "vm.dirty_ratio = 0" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
87+
echo "vm.dirty_background_bytes = 1610612736 # 1.5GB" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
88+
echo "vm.dirty_bytes = 4294967296 # 4GB" | sudo tee -a /etc/sysctl.d/10-gpdb.conf > /dev/null
89+
fi
90+
91+
sudo sysctl -p
92+
93+
sudo tee -a /etc/security/limits.d/10-nproc.conf << EOF
94+
* soft nofile 524288
95+
* hard nofile 524288
96+
* soft nproc 131072
97+
* hard nproc 131072
98+
* soft core unlimited
99+
EOF
100+
101+
102+
ulimit -n 65536 65536
103+

0 commit comments

Comments
 (0)