You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.9 KiB
52 lines
1.9 KiB
#安装依赖
|
|
yum install -y libaio-devel flex bison ncurses-devel glibc-devel patch readline-devel libnsl net-tools ntpdate expect tar gcc make gcc-c++ openssl-devel
|
|
pip3 install psutil netifaces cffi pycparser cryptography pynacl bcrypt paramiko -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
|
# 安装步骤
|
|
mkdir /usr/local/openGauss
|
|
cd /usr/local/software/
|
|
wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.0.0/x86_openEuler_2203/openGauss-Lite-5.0.0-openEuler-x86_64.tar.gz
|
|
tar zxvf openGauss-Lite-5.0.0-openEuler-x86_64.tar.gz -C /usr/local/openGauss
|
|
|
|
groupadd dbgrp
|
|
useradd -g dbgrp -m omm
|
|
echo omm | passwd --stdin omm
|
|
|
|
chmod -R 777 /usr/local/openGauss
|
|
|
|
su - omm
|
|
cd /usr/local/openGauss
|
|
./install.sh --mode single -D /usr/local/openGauss/data -R /usr/local/openGauss/install --start
|
|
source /home/omm/.bashrc
|
|
|
|
vi /usr/local/openGauss/data/postgresql.conf
|
|
listen_addresses = '*'
|
|
password_encryption_type = 0
|
|
|
|
vi /usr/local/openGauss/data/pg_hba.conf
|
|
|
|
替换为下面的内容:
|
|
|
|
# "local" is for Unix domain socket connections only
|
|
local all all trust
|
|
# IPv4 local connections:
|
|
host all all 127.0.0.1/32 trust
|
|
host all all 0.0.0.0/0 md5
|
|
# IPv6 local connections:
|
|
host all all ::1/128 trust
|
|
# Allow replication connections from localhost, by a user with the
|
|
# replication privilege.
|
|
#local replication gsdb trust
|
|
#host replication gsdb 127.0.0.1/32 trust
|
|
#host replication gsdb ::1/128 trust
|
|
|
|
|
|
gs_ctl restart -D /usr/local/openGauss/data
|
|
|
|
gsql -d postgres
|
|
CREATE USER postgres WITH PASSWORD 'DsideaL147258369';
|
|
ALTER USER postgres sysadmin;
|
|
|
|
# 自动启动
|
|
echo "su omm -c 'gs_ctl restart -D /usr/local/openGauss/data'" >> /etc/rc.local
|
|
chmod +x /etc/rc.d/rc.local |