1. 环境准备:硬件与系统配置
在开始安装openGauss之前,需要确保你的硬件和操作系统满足最低要求。我遇到过不少因为环境配置不当导致的安装失败案例,这里把关键点梳理清楚:
硬件要求(开发测试环境):
- CPU:至少4核(推荐8核以上)
- 内存:建议8GB起步,生产环境至少32GB
- 磁盘空间:系统盘50GB,数据盘根据业务需求规划(建议100GB以上SSD)
操作系统兼容性: openGauss官方支持openEuler、CentOS等主流Linux发行版。实测在CentOS 7.6上运行稳定,以下是系统配置要点:
# 关闭防火墙(生产环境需谨慎)
systemctl stop firewalld
systemctl disable firewalld
# 禁用SELinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
# 配置内核参数(关键!)
cat >> /etc/sysctl.conf << EOF
# openGauss优化参数
vm.overcommit_memory = 0
net.ipv4.tcp_max_tw_buckets = 10000
kernel.sem = 250 6400000 1000 25600
kernel.shmall = 1152921504606846720
EOF
sysctl -p
# 调整资源限制
echo "* soft nofile 1000000" >> /etc/security/limits.conf
echo "* hard nofile 1000000" >> /etc/security/limits.conf

8935

被折叠的 条评论
为什么被折叠?



