Prepare the GAS for DB Sync
Configure GAS/GIP for DB Sync
-
Open a command line terminal.
-
Set up the environment:
- Go to the FGLGWS installation directory and run the
envcompscript (envcomp.bat on Windows) - Go to the GAS installation directory and run the
envasscript (envas.bat on Windows)
- Go to the FGLGWS installation directory and run the
-
Set up a general GAS configuration file for DB Sync.
Copy the default $FGLASDIR/etc/as.xcf to a specific file such as custom-config-dir/dbsync_gas_config.xcf.
The General GAS configuration file must define the locale for DB Sync programs and the database client settings depending on the type of your database server.-
DB Sync configuration apps and DB Sync server programs must define a locale with UTF-8 encoding.
The XCF file templates are prepared to use an XCF resource named
res.dbsync.localeto define the locale.To specify the locale using UTF-8 encoding, add the
res.dbsync.localeresource.On Unix/Linux:<RESOURCE Id="res.dbsync.locale" Source="INTERNAL">en_US.utf8</RESOURCE>On Windows®:<RESOURCE Id="res.dbsync.locale" Source="INTERNAL">.fglutf8</RESOURCE> -
Define the database software client environment settings, in the sections to start applications and services elements:
SERVICE_APPLICATION_EXECUTION_COMPONENTWEB_APPLICATION_EXECUTION_COMPONENT
For example, when using a PostgreSQL database:
On Unix/Linux, define theres.postgresql.dirresource in theUNXelement:<RESOURCE Id="res.postgresql.dir" Source="INTERNAL">/var/postgresql</RESOURCE>Then define the
PGDIRandLD_LIBRARY_PATHenvironment variables in the*_COMPONENTelements:<ENVIRONMENT_VARIABLE Id="PGDIR">$(res.postgresql.dir)</ENVIRONMENT_VARIABLE> <ENVIRONMENT_VARIABLE Id="LD_LIBRARY_PATH">$(res.postgresql.dir)/lib</ENVIRONMENT_VARIABLE>Note:On macOS®, you cannot define the DYLD_LIBRARY_PATH environment variable for security reasons: The PostgreSQL client library must be found from /usr/local/lib synbolic links.
On Windows, append the directory where the PostgreSQL client library DLL is located, in thePATHenvironment variable definition in the*_COMPONENTelements:<ENVIRONMENT_VARIABLE Id="PATH">$(res.postgresql.dir)\bin;$(res.path)</ENVIRONMENT_VARIABLE>
-
-
Start the GAS dispatcher for testing:
httpdispatch -f custom-config-dir/dbsync_gas_config.xcfNote:Until the issue GIP-233 is fixed, the custom-config-dir path provided with the
-foption to httpdispatch command must be an absolute path.