瀚高V9的快速安装部署与注意事项
介质使用
上传文件
mkdir -p /highgo /opt/highgo
useradd highogo
chown highgo /opt/highgo /highgo -R
chmod 700 /highgo -R
su - highgo
进行执行./bin 安装
选择路径 /opt/highgo
输入密码 Testxxxxxxxx?!
兼容性选择 postgresql
定制化安装能够避免时候很多修改配置节的工作.
服务启动:
root 用户
echo "export PGDATA=/opt/highgo/data" >/etc/profile.d/highgo.sh
su - highgo
pg_ctl start -m f
设置开机启动
mkdir -p /deploy
echo 'su - highgo -c "/opt/highgo/bin/pg_ctl stop -m f" ' >/deploy/stophg
echo 'su - highgo -c "/opt/highgo/bin/pg_ctl start -m f" ' >/deploy/starthg
echo 'su - highgo -c "/opt/highgo/bin/pg_ctl restart -m f" ' >/deploy/restarthg
chmod 777 /deploy/* -R
设置密码:
alter user highgo with password 'Testxxxxxxxx?!';
创建用户时:
因为默认不使用?! 所以用户密码为 Test@xxxxxxxx
用户为 myapp2309highgo
部分参数修改:
psql highgo highgo
alter system set max_connections = 2000;
alter system set checkpoint_timeout = '30min';
alter system set checkpoint_completion_target = 0.8;
alter system set log_destination = 'csvlog';
alter system set logging_collector = on;
alter system set log_directory = 'hgdb_log';
alter system set log_filename = 'highgodb-%a.log';
alter system set log_rotation_age = '1d';
alter system set log_rotation_size = 0;
alter system set log_truncate_on_rotation = on;
alter system set log_statement = 'ddl';
alter system set shared_buffers = '8GB';
其他处理
su -highgo
psql highgo highgo
set search_path="$user", public,myapp2309highgo;
\q
psql myapp2309highgo highgo
create extension if not EXISTS "uuid-ossp";
DROP CAST IF EXISTS (varchar as integer );
create cast(varchar as integer ) with inout as implicit;
update pg_cast set castcontext = 'i' where castsource = 'integer'::regtype and casttarget = 'boolean'::regtype;
\q
psql myapp2309highgo myapp2309highgo
CREATE OR REPLACE FUNCTION sys_guid()
RETURNS uuid AS
$BODY$
declare cur uuid;
BEGIN
select uuid_generate_v4() into cur;
return cur;
END;
$BODY$
LANGUAGE plpgsql;
\q
psql myapp2309highgo highgo
DROP CAST IF EXISTS (varchar as integer );
create cast(varchar as integer) with inout as implicit;
\q
标签:opt,set,log,部署,system,注意事项,highgo,V9,alter
From: https://www.cnblogs.com/jinanxiaolaohu/p/18061203