Skip to content

Instantly share code, notes, and snippets.

@VTacius
Created December 7, 2023 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VTacius/3816e1ce6c0ea64b486ce8928c49a89c to your computer and use it in GitHub Desktop.
Save VTacius/3816e1ce6c0ea64b486ce8928c49a89c to your computer and use it in GitHub Desktop.
Instalación de openGauss en openEuler
<?xml version="1.0" encoding="utf-8"?>
<ROOT>
<CLUSTER>
<PARAM name="clusterName" value="sanidad" />
<PARAM name="nodeNames" value="data-openeuler-01"/>
<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" />
<PARAM name="corePath" value="/opt/huawei/corefile"/>
<PARAM name="backIp1s" value="10.10.20.21"/>
</CLUSTER>
<DEVICELIST>
<DEVICE sn="node1_hostname">
<PARAM name="name" value="data-openeuler-01"/>
<PARAM name="azName" value="AZ1"/>
<PARAM name="azPriority" value="1"/>
<PARAM name="backIp1" value="10.10.20.21"/>
<PARAM name="sshIp1" value="10.10.20.21"/>
<!-- dn -->
<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>

Preparando el sistema

Realizamos un par de configuraciones que los script no consideran

systemctl disable --now firewalld.service
sed -i -E 's/(^SELINUX=)enforcing/\1disabled/g' /etc/selinux/config
sed -i '/net.ipv4.tcp_syncookies/ i net.ipv4.tcp_retries1 = 5' /etc/sysctl.conf
sed -i '/net.ipv4.tcp_syncookies/ a net.ipv4.tcp_syn_retries = 5' /etc/sysctl.conf
sysctl -p

Enviamos al servidor el paquete correspondiente

mkdir /opt/opengauss
tar xzvf openGauss-5.0.0-openEuler-64bit-all.tar.gz -C /opt/opengauss/
cd /opt/opengauss
tar xzvf openGauss-5.0.0-openEuler-64bit-om.tar.gz

Configuramos el servidor con los script que ellos nos dan:

Si bien se adjunta un ejemplo, acá hay más ejemplos de como configurarlo

mkdir /opt/huawei/install/
chmod 777 /opt/huawei/install/
# Modificar según requerimientos en base a los ejemplos
cp script/gspylib/etc/conf/cluster_config_template.xml cluster_config.xml

TODO: Verificar transparent_hugepage=never

./gs_preinstall -U omm -G dbgrp -X /opt/opengauss/cluster_config.xml

Ests configuraciones son necesarias y quedaron sin hacer con el script antesrior:

echo "* soft nofile 1000000" >>/etc/security/limits.conf
echo "* hard nofile 1000000" >>/etc/security/limits.conf

Hacemos la instalación propiamente dicha del aplicativo

su - omm
gs_install -X /opt/opengauss/cluster_config.xml 
exit

chmod 755 /opt/huawei/install/
chown omm /opt/huawei/install/

Notas:

  • Es especialmente sensible a quedarse sin memoria. 4 Gb parece ser un mínimo necesario, pero no tengo recursos para confirmarlo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment