初始化完数据库提示缺少server文件的处理方法

文档用途

本文档适用于解决数据库启动过程中提示缺少server文件。

详细信息

1.问题描述:
部分数据库安装包在安装后不会自动初始化数据库,需手动进行初始化数据库,初始化完成后按照提示启动数据库时会提示报错:

waiting for server to start....2020-12-23 15:07:11.690 CST [17303] FATAL:  could not load server certificate file "server.crt": No such file or directory
2020-12-23 15:07:11.690 CST [17303] LOG:  database system is shut down

2.解决方案:
将安装目录下etc目录下的server.key及server.crt文件拷贝至data目录下并将server.key赋权为0600
具体步骤(以4.5.2为例):

2.1 拷贝server文件至data目录

[root@hgdw3 etc]# cp  /opt/HighGo4.5.2-see/etc/server.* /opt/HighGo4.5.2-see/data

2.2 对server.key赋权

[root@hgdw3 etc]# chmod 0600 /opt/HighGo4.5.2-see/data/server.key

2.3 启动数据库

[root@hgdw3 etc]# pg_ctl startwaiting for server to start....2020-12-23 16:33:22.091 CST [22309] LOG:  starting HighGo Security Enterprise Edition Database System 4.5.2 on CentOS7 x86_64,build on 20201009
2020-12-23 16:33:22.093 CST [22309] LOG:  listening on IPv6 address "::1", port 5866
2020-12-23 16:33:22.093 CST [22309] LOG:  listening on IPv4 address "127.0.0.1", port 5866
2020-12-23 16:33:22.100 CST [22309] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5866"
2020-12-23 16:33:22.132 CST [22309] LOG:  This is a trial edition, validate until 2021-01-22 15:06:15.
2020-12-23 16:33:22.137 CST [22312] LOG:  database system was shut down at 2020-12-23 15:06:19 CST
2020-12-23 16:33:22.138 CST [22312] LOG:  Switchover the SSHA Role. Current is NONE
2020-12-23 16:33:22.146 CST [22309] LOG:  database system is ready to accept connections
 done
server started

至此,数据库启动过程中提示缺少server文件问题即解决。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值