统信UOS系统安装OpenGauss5.0.0步骤

统信1060e安装OpenGauss5.0.0步骤

##使用yum来安装依赖包或者使用uos-server-20-1060e.iso镜像挂载安装(小编采用镜像挂载安装有关依赖)
yum -y install libaio-devel flex bison ncurses-devel glibc-devel patch redhat-lsb-core readline-devel python3

ifconfig enp18s0 mtu 8192
systemctl disable firewalld
systemctl stop firewalld

###关闭RemoveIPC
[root@klgdj ~]# sed -i ‘/^RemoveIPC/d’ /etc/systemd/logind.conf
[root@klgdj ~]# sed -i ‘/^RemoveIPC/d’ /usr/lib/systemd/system/systemd-logind.service
[root@klgdj ~]# echo “RemoveIPC=no” >> /etc/systemd/logind.conf
[root@klgdj ~]# echo “RemoveIPC=no” >> /usr/lib/systemd/system/systemd-logind.service

#vi /etc/sysctl.conf

net.ipv4.tcp_retries1 = 5
net.ipv4.tcp_syn_retries = 5
net.sctp.path_max_retrans = 10
net.sctp.max_init_retransmits = 10
net.ipv4.tcp_max_tw_buckets = 10000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_keepalive_time = 30
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_retries2 = 12
net.ipv4.ip_local_reserved_ports = 15400-15407,20050-20057
net.core.wmem_max = 21299200
net.core.rmem_max = 21299200
net.core.wmem_default = 21299200
net.core.rmem_default = 21299200
kernel.sem = 250 6400000 1000 25600
net.ipv4.tcp_rmem = 8192 250000 16777216
net.ipv4.tcp_wmem = 8192 250000 16777216
vm.min_free_kbytes = 201318
net.core.netdev_max_backlog = 65535
net.ipv4.tcp_max_syn_backlog = 65535
net.core.somaxconn = 65535
kernel.shmall = 1152921504606846720
kernel.shmmax = 18446744073709551615

###配置资源限制
echo “* soft stack 3072” >> /etc/security/limits.conf
echo “* hard stack 3072” >> /etc/security/limits.conf
echo “* soft nofile 1000000” >> /etc/security/limits.conf
echo “* hard nofile 1000000” >> /etc/security/limits.conf
echo “* soft nproc unlimited” >> /etc/security/limits.d/90-nproc.conf

###查看配置
tail -n 4 /etc/security/limits.conf
tail -n 1 /etc/security/limits.d/90-nproc.conf

关闭透明大页
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled

echo ‘echo never > /sys/kernel/mm/transparent_hugepage/defrag’ >> /etc/rc.d/rc.local
echo ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ >> /etc/rc.d/rc.local

[root@klgdj ~]# chmod +x /etc/rc.d/rc.local
[root@klgdj ~]# /usr/bin/sh /etc/rc.d/rc.local

设置字符集参数
###将数据库节点的字符集设置为en_US.UTF-8
echo “LANG=en_US.UTF-8” >> /etc/profile
source /etc/profile
echo $LANG

设置时区和时间
###查询时区
[root@klgdj ~]# timedatectl
timedatectl list-timezones |grep Shanghai
timedatectl set-timezone Asia/Shanghai

###使用swapoff -a命令将交换内存关闭—集群模式则需要各节点执行
###关闭命令
[root@klgdj ~]# swapoff -a
###开启命令
[root@klgdj ~]# swapon -a

###创建安装目录
mkdir -p /opt/software/openGauss
chmod 755 -R /opt/software

tar -zxvf openGauss-5.0.0-openEuler-64bit-all.tar.gz -C /opt/software/openGauss/
cd /opt/software/openGauss/
tar -zxvf openGauss-5.0.0-openEuler-64bit-om.tar.gz

###在/opt/software/openGauss 路径下,创建一个名为 cluster_config.xml的文件
cd /opt/software/openGauss
vim cluster_config.xml
###单节点配置文件

<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
    <!-- openGauss整体信息 -->
    <CLUSTER>
        <!-- 数据库名称 -->
        <PARAM name="clusterName" value="dbCluster" />
        <!-- 数据库节点名称(hostname) -->
        <PARAM name="nodeNames" value="node0" />
        <!-- 数据库安装目录-->
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" />
        <!-- 日志目录-->
        <PARAM name="gaussdbLogPath" value="/var/log/omm" />
        <!-- 临时文件目录-->
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp" />
        <!-- 数据库工具目录-->
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" />
        <!-- 数据库core文件目录-->
        <PARAM name="corePath" value="/opt/huawei/corefile" />
        <!-- 节点IP,与数据库节点名称列表一一对应 -->
        <PARAM name="backIp1s" value="10.12.20.19"/>
    </CLUSTER>
    <!-- 每台服务器上的节点部署信息 -->
    <DEVICELIST>
        <!-- 节点1上的部署信息 -->
        <DEVICE sn="node1_hostname">
            <!-- 节点1的主机名称 -->
            <PARAM name="name" value="node0"/>
            <!-- 节点1所在的AZ及AZ优先级 -->
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- 节点1的IP,如果服务器只有一个网卡可用,将backIP1和sshIP1配置成同一个IP -->
            <PARAM name="backIp1" value="10.12.20.19"/>
            <PARAM name="sshIp1" value="10.12.20.19"/>

            <!--dbnode-->
            <PARAM name="dataNum" value="1"/>
            <PARAM name="dataPortBase" value="15400"/>
            <PARAM name="dataNode1" value="/opt/huawei/install/data/dn"/>
            <PARAM name="dataNode1_syncNum" value="0"/>
        </DEVICE>
    </DEVICELIST>
</ROOT>

cd /opt/software/openGauss/script
./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml --unused-third-party
报错一如下:
Exception: [GAUSS-51900] : The current OS is not supported.Supported platforms are: [‘suse’, ‘redhat’, ‘centos’, ‘euleros’, ‘openeuler’, ‘kylin’, ‘fusionos’, ‘asianux’, ‘debian’, ‘ubuntu’].
解决:
[root@localhost etc]# ls -l|grep release
-rw-r–r-- 1 root root 92 6月 1 2023 lsb-release
-rw-r–r-- 1 root root 216 6月 1 2023 os-release
lrwxrwxrwx 1 root root 17 6月 1 2023 system-release -> UnionTech-release
-rw-r–r-- 1 root root 41 6月 1 2023 system-release-cpe
-rw-r–r-- 1 root root 22 6月 1 2023 UnionTech-release

rm -rf /etc/system-release
cp /etc/UnionTech-release /etc/openEuler-release
ln -s /etc/openEuler-release /etc/system-release

cat /etc/UnionTech-release
uos release 20 (fuyu)

rm /etc/UnionTech-release
还原的话就是
rm -rf /etc/system-release
ln -s /etc/system-release /etc/UnionTech-release
rm /etc/openEuler-release
重启服务器
reboot

pip-3 install psutil netifaces cffi pycparser cryptography pynacl bcrypt paramiko -i https://pypi.tuna.tsinghua.edu.cn/simple
cd /opt/software/openGauss/script
./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml --unused-third-party
报错二如下:
[GAUSS-51620] : Failed to obtain local instance information. It is not a host name localhost.localdomain.
解决:
#hostnamectl set-hostname node0
重新连接使主机名生效
[root@localhost script]# ./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml --unused-third-party
yes
WWW.root123
报错三如下:
[GAUSS-51103] : Failed to execute the PSSH command [encrypt …].Error is:./encrypt: /usr/lib64/libc.so.6: version GLIBC_2.33' not found (required by ./encrypt) ./encrypt: /usr/lib64/libc.so.6: version GLIBC_2.34’ not found (required by ./encrypt)

wget http://www.rpmfind.net/linux/centos-stream/9-stream/BaseOS/aarch64/os/Packages/glibc-2.34-110.el9.aarch64.rpm
wget http://www.rpmfind.net/linux/centos-stream/9-stream/BaseOS/aarch64/os/Packages/glibc-common-2.34-110.el9.aarch64.rpm
wget http://www.rpmfind.net/linux/centos-stream/9-stream/BaseOS/aarch64/os/Packages/glibc-all-langpacks-2.34-110.el9.aarch64.rpm

rpm -ivh --force glibc-2.34-110.el9.aarch64.rpm glibc-all-langpacks-2.34-110.el9.aarch64.rpm glibc-common-2.34-110.el9.aarch64.rpm
rpm -qa|grep glibc
cd /opt/software/openGauss/script/
./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
su – omm
gs_install -X /opt/software/openGauss/cluster_config.xml

gs_om -t status
gs_om -t status --detail
gsql -d postgres -p 15400

postgres: openGauss安装完成后默认生成的数据库。初始可以连接到此数据库进行新数据库的创建。
15400: 数据库主节点的端口号
  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

king01299

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值