统信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
###单节点配置文件



    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
    
        
        
            
            
            
            
            
            
            
            

            
            
            
            
            
        
    

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: 数据库主节点的端口号

你可能感兴趣的:(国产信创数据库,linux,运维,gaussdb)