1、安装pgsql
yum install -y postgresql12-server
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12
2、修改pgsql的密码
sudo -u postgres psql
ALTER USER postgres WITH PASSWORD ‘postgres’;
homer-app -create-config-db -database-root-user=postgres -database-host=172.16.247.201 -database-root-password=postgres -database-homer-user=postgres
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLiAzNfRHLGZkRGZkRfJ3bs92YsYTMfVmepNHL90TUi5WNXFGdk1mYox2MMBjVtJWd0ckW65UbM5WOHJWa5kHT20ESjBjUIF2X0hXZ0xCMx81dvRWYoNHLrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdssmch1mclRXY39CXldWYtlWPzNXZj9mcw1ycz9WL49zZuBnLzQTNxEjNyUTM0IzMwEjMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
homer-app -create-data-db -database-root-user=postgres -database-host=172.16.247.201 -database-root-password=postgres -database-homer-user=postgres
修改homer数据库连接
vim /usr/local/homer/etc/webapp_config.json
创建表单
homer-app -create-table-db-config
homer-app -populate-table-db-config
homer-app -upgrade-table-db-config
systemctl start heplify-server
systemctl start homer-app
配置参考:
“database_config”: {
“help”: “Settings for PGSQL Database (settings)”,
“host”: “172.16.66.34”,
“keepalive”: true,
“name”: “homer_config”,
“node”: “LocalConfig”,
“pass”: “postgres”,
“user”: “postgres”
},
“database_data”: {
“localnode”: {
“help”: “Settings for PGSQL Database (data)”,
“host”: “172.16.66.52”,
“keepalive”: true,
“name”: “homer_data”,
“node”: “LocalNode”,
“pass”: “postgres”,
“user”: “postgres”
},
“RemoteNode-1”: {
“help”: “Settings for PGSQL Database (data)”,
“node”: “RemoteNode-1”,
“user”: “postgres”,
“pass”: “postgres”,
“name”: “homer_data”,
“host”: “172.16.66.53”
},
“RemoteNode-2”: {
“help”: “Settings for PGSQL Database (data)”,
“node”: “RemoteNode-2”,
“user”: “postgres”,
“pass”: “postgres”,
“name”: “homer_data”,
“host”: “172.16.66.54”
},
“RemoteNode-3”: {
“help”: “Settings for PGSQL Database (data)”,
“node”: “RemoteNode-3”,
“user”: “postgres”,
“pass”: “postgres”,
“name”: “homer_data”,
“host”: “172.16.66.55”
}