麒麟服务器安装瀚高数据库(highgo)

该文详细介绍了如何从官网下载HighGo企业版安装包,通过RPM在服务器上安装,设置环境变量,初始化数据库,配置监听地址和认证方式,启动数据库服务,创建数据库,并下载驱动以实现远程连接。整个过程涵盖了数据库管理的关键步骤。
摘要由CSDN通过智能技术生成

下载安装包

官网(https://www.highgo.com/),选择企业版。
在这里插入图片描述

上传文件到服务器

[root@master ~]# mv 1b73693f2c91fd7f38acbc7d3882cf6c.rpm hg.rpm
[root@master ~]# rpm -ivh hg.rpm 
Verifying...                          ################################# [100%]
准备中...                          ################################# [100%]
正在升级/安装...
   1:hgdb-enterprise-6.0.4-1.el7.cento################################# [100%]
无遗留数据文件
Created symlink /etc/systemd/system/multi-user.target.wants/hgdb-enterprise-6.0.4.service → /usr/lib/systemd/system/hgdb-enterprise-6.0.4.service.
Created symlink /etc/systemd/system/graphical.target.wants/hgdb-enterprise-6.0.4.service → /usr/lib/systemd/system/hgdb-enterprise-6.0.4.service.

配置环境变量

[highgo@master bin]$ cat /opt/HighGo6.0.4-cluster/etc/highgodb.env 
export HG_BASE=/opt/HighGo6.0.4-cluster
export HGDB_HOME=/opt/HighGo6.0.4-cluster
export PGPORT=5866
export PGDATABASE=highgo
export PGDATA=$HGDB_HOME/data
export PATH=$HGDB_HOME/bin:$PATH
[root@master bin]# vi /etc/profile
[root@master bin]# source /etc/profile

初始化数据库

[root@master ~]# su highgo
[highgo@master bin]$ cd /opt/HighGo6.0.4-cluster/bin/
[highgo@master bin]$ mkdir /opt/HighGo6.0.4-cluster/data
[highgo@master bin]$ ./initdb 
属于此数据库系统的文件宿主为用户 "highgo".
此用户也必须为服务器进程的宿主.
数据库簇将使用本地化语言 "zh_CN.UTF-8"进行初始化.
默认的数据库编码已经相应的设置为 "UTF8".
initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"
缺省的文本搜索配置将会被设置到"simple"

禁止为数据页生成校验和.
Data encryption is disabled.

输入新的超级用户口令: 
再输入一遍: 

修复已存在目录 /opt/HighGo6.0.4-cluster/data 的权限 ... 成功
正在创建子目录 ... 成功
选择动态共享内存实现 ......posix
选择默认最大联接数 (max_connections) ... 100
选择默认共享缓冲区大小 (shared_buffers) ... 128MB
selecting default time zone ... Asia/Shanghai
创建配置文件 ... 成功
正在运行自举脚本 ...成功
正在执行自举后初始化 ...成功
同步数据到磁盘...成功

initdb: 警告: enabling "md5" authentication for local connections
你可以通过编辑 pg_hba.conf 更改或你下次
执行 initdb 时使用 -A或者--auth-local和--auth-host选项.

成功。您现在可以用下面的命令开启数据库服务器:

    ./pg_ctl -D /opt/HighGo6.0.4-cluster/data -l 日志文件 start

修改配置文件并启动

[highgo@master HighGo6.0.4-cluster]$ cd data/
[highgo@master data]$ vi postgresql.conf 
listen_addresses = '*'
port = 5866
ssl = off
[highgo@master data]$ vi pg_hba.conf 
# IPv4 local connections:
host    all             all             0.0.0.0/0            md5
[highgo@master bin]$ ./pg_ctl -D /opt/HighGo6.0.4-cluster/data -l logfile restart
等待服务器进程关闭 ... 完成
服务器进程已经关闭
等待服务器进程启动 .... 完成
服务器进程已经启动
[highgo@master bin]$ ./psql -U highgo
用户 highgo 的口令:
psql (HighGo Database 6 Release 6.0.4-64-bit Production)

PSQL: Release HighGo Database 6 Release 6.0.4-64-bit Production
输入 "help" 来获取帮助信息.

highgo=# create database testdb owner highgo;
CREATE DATABASE

下载驱动远程连接

https://search.maven.org/artifact/com.highgo/HgdbJdbc(6.04/jre8)
DBeaver:“数据库”->“驱动管理器”
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值