当前位置:网站首页>The practice of opengauss database on CentOS, configuration
The practice of opengauss database on CentOS, configuration
2022-07-18 04:19:00 【Dream eraser】
Server preparation
use VM Install a virtual host locally , In the installation CentOS that will do .
The purpose of this experiment is to find out the potential problems , Gu eraser chose an off-site server , The configuration is as follows :
1 CPU 2 GB / CentOS 7.6 64 position / 40 GB System disk
Copy code SSH Connect the software to use FinalShell, The effect picture after connection is as follows :
Check the system version information .
cat /etc/redhat-release
Copy code When the environment is ready , You can modify it yum Source .
Switch yum From Huawei source
CentOS Default access to foreign sources , To speed up, you can switch to Huawei source .
The operation steps are as follows :
1. install wget
yum install wget -y
Copy code 2. Back up official source
cd /etc/yum.repos.d/
rename repo repo.old CentOS-*.repo
Copy code 3. Download Huawei source
wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo
Copy code 4. Clear original cache + Generate new cache
yum clean all
yum makecache
Copy code You can also view the configuration file at the same time , Refresh cache
yum repolist all
Copy code install opengauss
Environment configuration complete , You can enter the installation process , Use the following command to operate .
yum install -y libaio-devel flex bison ncurses-devel glibc.devel patch lsb_release openssl* python3
Copy code Status prompt The prompt for successful installation is as follows :
Switch the system default Python edition
Get into /usr/bin Catalog , Backup Python file
cd /usr/bin
Copy code Backup Python file , At the same time establish python3 Soft connection
mv python python.bak
ln -s python3 /usr/bin/python
Copy code At this point, the switching is completed , Use python3 The corresponding output has been obtained .
Turn off firewall
Because the official only supports the installation when the firewall is turned off , Therefore, it is necessary to refer to the following settings
[[email protected] yum.repos.d]# systemctl disable firewalld.service
[[email protected] yum.repos.d]# systemctl stop firewalld.service
Copy code View firewall status , Use systemctl status firewalld.
close selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
Copy code See if it's off , Please use the following command :
cat /etc/selinux/config
Copy code Set character set
cat >> /etc/profile <<EOF
> export LANG=en_US.UTF-8
> EOF
Copy code You can view the content after setting , The effect is as follows :
Finally, execute the following command , Make sure the configuration works .
source /etc/profile
Copy code Switch off switched memory
swapoff -a
Copy code This is because the memory of our current server is too small , Prevent after installation , Database crash .
Create installation users , User groups and software installation directories
Set up user groups
[[email protected] bin]# groupadd dbgrp
[[email protected] bin]# useradd -g dbgrp -d /home/omm -m -s /bin/bash omm
[[email protected] bin]# echo "omm" | passwd --stdin omm
[[email protected] bin]# mkdir -p /opt/software/openGauss
[[email protected] bin]# chmod 755 -R /opt/software
[[email protected] bin]# chown -R omm:dbgrp /opt/software/openGauss
Copy code Configuration here , Can pause , Restart the operating system
Set time zone
Operate on the following documents .
rm -fr /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ll /etc/localtime
Copy code close RemoveIPC
modify /etc/systemd/logind.conf In the document RemoveIPC Parameter is no.
Save use wq!.
modify /usr/lib/systemd/system/systemd-logind.service In file RemoveIPC Parameters , without , Manually replenish the value .
RemoveIPC=no
Copy code Set the nic MTU value
Use ifconfig View network card information .
about X86,MTU It's worth recommending 1500; about ARM,MTU It's worth recommending 8192.
ifconfig eth0 mtu 1500
Copy code install OpenGauss
Open the software download address :opengauss.org/zh/download…
After downloading , Upload to the... Created above /opt/software/openGauss directory .
Unzip the file , Use the following command :
tar -zxvf openGauss-3.0.0-CentOS-64bit-all.tar.gz
tar -zxvf openGauss-3.0.0-CentOS-64bit-om.tar.gz
Copy code The directory structure after decompression is :
Next, continue to configure openGauss Of cluster_config.xml file , The file contains openGauss Server information 、 The installation path 、IP Address 、 Port number, etc .
Copy template to \opt\software\openGauss Under the table of contents , The command is as follows :
cp /script/gspylib/etc/conf/cluster_config_template.xml /opt/software/openGauss
Copy code Change the file name cluster_config.xml.
mv cluster_config_template.xml cluster_config.xml
Copy code Use vim cluster_config.xml Open profile , Then modify the following ( The file should preferably be modified locally , Uploading ):
Make sure again hostname Agreement .
hostname
cat /etc/hostname
Copy code And then modify... Again cluster_config.xml Of documents hostname.
Load environment variables
export LD_LIBRARY_PATH=/opt/software/Gauss/script/gspylib/clib:$LD_LIBRARY_PATH
Copy code Create a directory and edit it
mkdir –p /opt/huawei
chmod 777 -R /opt/huawei
Copy code Add network kernel parameters
vim /etc/sysctl.conf
Copy code Add as follows :
net.ipv4.tcp_retries1 = 5
net.ipv4.tcp_syn_retries = 5
net.sctp.path_max_retrans = 10
net.sctp.max_init_retransmits = 10
Copy code Next entry cd /opt/software/openGauss/script Catalog , Execute the following command to start trying to run everything we configured above .
./gs_preinstall -U omm -G dbgrp -X /opt/software/openGauss/cluster_config.xml
Copy code The result is the following error , Follow the error prompt to start the redo process , This is what we will cover in our next blog .
openGauss Database installation process , There are many configuration files that need to be modified , When we learn again , It can be modified continuously , According to the error prompt , Where something goes wrong, change it , This article starts with the basic configuration , In the next blog, we will redo the configuration , See you next .
- I am participating in the recruitment of nuggets technology community creator signing program , Click the link to sign up for submission .
边栏推荐
- JVM垃圾收集—垃圾收集器及常见组合参数
- JS image clipping and compression integration plug-in
- Technology sharing | sending requests using curl
- On the difference and use of hash and history
- MIMX8MD6CVAHZAB I.MX 8MDUAL Cortex-A53 - 微处理器
- Xinhuicheng passed the registration: the annual revenue was 800million, and Zheng Ruijun, the actual controller, had more than 300million liabilities
- [openfoam Pre - school Preparation 3 - install openfoam - V8]
- 创意丝带样式登录页面
- Technology sharing | common interface protocol analysis
- Blue Bridge Cup VIP question bank
猜你喜欢

四剑客与Code Review的恩怨情仇:“始乱终弃”到“浪子回头”
![[voforia] display specific AR models by recognizing your own set pictures](/img/4c/36a2009ea309379aa105a94f82b7ac.png)
[voforia] display specific AR models by recognizing your own set pictures

扁平化骑手注册表单

创意丝带样式登录页面

Gavin wood, founder of Poka: what will happen to Poka governance V2?

Processes in Oracle

JVM memory model -- Characteristics and functions of runtime data area

101.(cesium篇)cesium粒子系统-下雪

JVM垃圾收集之——怎样判定一个对象是不是垃圾

How to test SQL of Flink? You can't use jar test every time, so sqk client comes
随机推荐
What is Oracle database SCN
Flock's yarn clustering mode (2)
进程间通信——信号原理及详解
【第二十四题】逻辑闭环(北理工/北京理工大学/程序设计方法与实践/小学期 )
100行以上就应该拆成函数
技术分享 | 常见接口协议解析
scroll-view 固定高度 实现触底效果
The relationship between reinforcement learning (Q-learning) and path search (a*)
最大子段和+线段树.1
leetcode 605. Can Place Flowers 种花问题 (简单)
关于hash和history的区别和使用
OSPF knowledge point 1
如何定制.NET6.0的日志记录
js看图猜水果蔬菜小游戏代码
Technology sharing | sending requests using curl
Creative ribbon style landing page
Fade the background registration + login form page
盘点波卡生态潜力项目 | 跨链特性促进多赛道繁荣
Flock's yarn clustering mode (1)
C语言输出教学日历表