做景区网站建设的公司,中山网络推广公司,千博网站后台,采购平台网国产 HighGo 数据库企业版安装与配置指南
1. 下载安装包
访问 HighGo 官方网站#xff08;https://www.highgo.com/#xff09;#xff0c;选择并下载企业版安装包。 2. 上传安装包到服务器
将下载的安装包上传至服务器#xff0c;并执行以下命令#xff1a;
[rootmas…国产 HighGo 数据库企业版安装与配置指南
1. 下载安装包
访问 HighGo 官方网站https://www.highgo.com/选择并下载企业版安装包。 2. 上传安装包到服务器
将下载的安装包上传至服务器并执行以下命令
[rootmaster ~]# mv 1b73693f2c91fd7f38acbc7d3882cf6c.rpm hg.rpm
[rootmaster ~]# 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.如果安装错了想要卸载可以通过如下命令卸载 rpm -qa 软件名 rpm -e 查询到的软件 3. 配置环境变量
编辑并设置环境变量
[highgomaster 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 PGPORT5866
export PGDATABASEhighgo
export PGDATA$HGDB_HOME/data
export PATH$HGDB_HOME/bin:$PATH将上述变量添加到 /etc/profile 文件这里需要超管root权限
[rootmaster bin]# vi /etc/profile加到最后一行就行 使配置生效
[rootmaster bin]# source /etc/profile为了保险防止权限不够使用超管将文件全部授权给普通用户如highgo chown -R highgo:highgo /opt/HighGo6.0.4-cluster/* 4. 初始化数据库
切换至 highgo 用户并初始化数据库 必须切换普通用户否则报错 必须切换普通用户否则报错 必须切换普通用户否则报错 [rootmaster ~]# su highgo
[highgomaster bin]$ cd /opt/HighGo6.0.4-cluster/bin/
[highgomaster bin]$ mkdir /opt/HighGo6.0.4-cluster/data
[highgomaster 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 日志文件 start5. 修改配置文件并启动服务
进入数据库配置目录并修改 postgresql.conf
[highgomaster HighGo6.0.4-cluster]$ cd data/
[highgomaster data]$ vi postgresql.conf 更新以下内容
listen_addresses *
port 5866
ssl off编辑 pg_hba.conf允许所有 IPv4 地址访问
[highgomaster data]$ vi pg_hba.conf 修改以下行
# IPv4 local connections:
host all all 0.0.0.0/0 md5重启数据库服务
[highgomaster bin]$ ./pg_ctl -D /opt/HighGo6.0.4-cluster/data -l logfile restart
等待服务器进程关闭 ... 完成
服务器进程已经关闭
等待服务器进程启动 .... 完成
服务器进程已经启动注意如果出现如下报错 说明已经启动过 systemctl start hgdb-enterprise-6.0.4那就暂停一下 systemctl stop hgdb-enterprise-6.0.45. navicat连接