麒麟服务器安装瀚高数据库(highgo)
下载安装包
官网(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:“数据库”->“驱动管理器”