【问题描述】
在给 /opt/sequoiasql/PostgreSQL 创建的软连接 /root/postgresql 里,创建实例:bin/sdb_sql_ctl addinst myinst -D pg_data/ ,报ERROR: No system configure file exist in /etc/default 异常。
【解决方法】
1.读取报错信息,是在 /etc/default 中缺少 sequoiasql-postgresql 文件,检索 /etc/default 文件夹是否包含此文件,如文件存在则查看sequoiasql-postgresql文件内容是否正确,核对VERSION,USER,INSTALL_DIR,MD5信息是否正确。
2.在使用bin/sdb_sql_ctl进行操作时,该脚本会先检查在/etc/default下的pg配置文件,对比文件信息,如安装目录与当前执行目录等。由于用户是在软连接下执行的命令操作,脚本检测到执行目录与安装目录不一致,导致脚本报错。
3.在安装目录下/opt/sequoiasql/postgresql 执行创建实例 bin/sdb_sql_ctl addinst myinst -D pg_data/ 的命令,或在任意目录下带全路径:/opt/sequoiasql/postgresql/bin/sdb_sql_ctl addinst myinst -D pg_data/ 执行此命令。