step by step系列之:openGauss1.0.1单机安装指南v1.2

Step by Step 之:openGauss1.0.1 单机安装指南 v1.2
在 CentOS7.6 上安装 openGauss 单机版

配置操作系统满足安装要求
硬件环境:虚拟机的内存 8GB,4 核心 CPU,900G 磁盘(非必须)

软件环境:CentOS7.6

关闭防火墙

停止 firewall

systemctl stop firewalld.service

禁止 firewall 开机启动

systemctl disable firewalld.service
关闭 SELinux

getenforce
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
setenforce 0
getenforce
修改/etc/hosts

添加一行

cat >>/etc/hosts <<EOF
... node1
EOF
配置库路径

cat>> /etc/profile<<EOF
export LD_LIBRARY_PATH=/opt/software/openGauss/script/gspylib/clib:$LD_LIBRARY_PATH
EOF
关闭 os 交换区

编辑/etc/fstab 文件,将交换区的那一行注释掉

vi /etc/fstab


临时关闭交换区命令:

swapoff -a
free
配置网络参数

cat>>/etc/sysctl.conf<<EOF
net.ipv4.ip_local_port_range = 26000 65500
net.ipv4.tcp_rmem = 4096 87380 4194304
net.ipv4.tcp_wmem = 4096 16384 4194304
net.ipv4.conf. ens33.rp_filter = 1
net.ipv4.tcp_fin_timeout=60
net.ipv4.tcp_retries1=5
net.ipv4.tcp_syn_retries=5
net.sctp.path_max_retrans=10
net.sctp.max_init_retransmits=10
EOF
说明:

如果对外工作的网卡万兆网卡 ens33,需要设计最大 MTU 为 8192。 虚拟机没有万兆网卡不能配置该项,否则认证报错!

配置 NTPD(单机可以不用配置)

yum install ntp -y
vi /etc/ntp.conf
添加以下一行:

restrict ... mask 255.255.255.0 nomodify notrap
添加以下 3 行,并注释掉所有的 server 行:

server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10

server node1

启动 ntpd 时间服务器

service ntpd start

开机自启动

chkconfig ntpd on
或者

systemctl enable ntpd.service
设置 root 用户远程登陆

sed -i "s/#Banner none/Banner none/g" /etc/ssh/sshd_config
cat >>/etc/ssh/sshd_config<<EOF
PermitRootLogin yes
EOF

systemctl restart sshd

检查

cat /etc/ssh/sshd_config | grep PermitRootLogin
PermitRootLogin yes

检查

cat /etc/ssh/sshd_config | grep Banner
Banner none
文件系统参数、系统支持的最大进程数

echo "* soft nofile 1000000" >>/etc/security/limits.conf
echo "* hard nofile 1000000" >>/etc/security/limits.conf
echo "* soft nproc unlimited" >>/etc/security/limits.conf
echo "* hard nproc unlimited" >>/etc/security/limits.conf
安装 python3.6.x

yum install openssl* -y
yum install python3* -y
说明:

也可以直接编译安装或者 rpm 包安装。

reboot
重新启动服务器

创建安装包的存放目录

mkdir -p /opt/software/openGauss
chmod 755 -R /opt/software
下载 openGauss 数据库软件

下载地址为:https://opengauss.org/zh/download/

数据库安装包上传至 centos 上

安装 openGauss 单机数据库
解压缩 openGauss DBMS 介质

cd /opt/software/openGauss
tar xf openGauss-1.0.1-CentOS-64bit.tar.gz
创建 XML 文件

cat > clusterconfig.xml<<EOF

posted @   openGaussbaby  阅读(23)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示