Version v3.7.0 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.
Configure
The configure script will generate the pigsty.yml config file inventory with good defaults according to your environment and input.
It’s OPTIONAL, you can edit the pigsty.yml directly as the tutorial shows.
pigsty/
Usage
The configure script is an interactive wizard unless -n|--non-interactive is specified.
| Option | Description |
|---|---|
-c|--conf |
Generate config from config templates according to this parameter |
-i|--ip |
Replace IP address placeholder 10.10.10.10 with given IP |
-v|--version |
Specify PostgreSQL major version number (13|14|15|16|17|18) |
-r|--region |
Set upstream repo mirror according to region (default|china|europe) |
-o|--output |
Write the generated inventory to this file (pigsty.yml by default) |
-x|--proxy |
Write current proxy env to the config proxy_env |
-s|--skip |
Skip interactive wizard and using default/arg values |
-n|--non-interactive |
Non-interactively mode |
-p|--port |
Specify SSH port (only used if set) |
Example
configure output example:
Behavior
If -c|--conf <template> is specified, it will generate the config file from the specified template. Such as meta, app/supa, etc…
If no config template is given, it will use the default 1-node config template meta.
If -i|--ip <ipaddr> is specified, it will replace the placeholder 10.10.10.10 in the config template with the given IP address.
Otherwise, if the current node has only one IP address, it will be used. If there are multiple IP addresses, it will ask you to input the primary IP address of current node manually.
If -v|--version is specified, it will use the specified PostgreSQL major version number, range from 13 to 18.
If no version is specified, it leaves the pg_version intact, which usually fallbacks to 18 by default.
If -r|--region is specified, it will use the specified region directly. The china mirror will be used where Google services are not accessible.
If -x|--proxy is specified, it will write the current proxy environment variables to the config proxy_env.
Will be reused during installation. Including: HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, NO_PROXY.
If -s|--skip is specified, it will skip IP address replacement and ssh sudo privilege check
If -n|--non-interactive is specified, this script will not ask you for anything, but you have to specify a primary IP address with -i|--ip <ipaddr> explicitly.
If -p|--port is specified, it will use the specified SSH port instead of the default 22.
It is used when your local SSH port is not 22.
Pigsty will use C.UTF-8 as the default locale, If:
- PostgreSQL major version ≥ 17, with built-in local provider (default)
- OR, Your system supports
C.utf8/C.utf-8locale (locale -a)
Otherwise, local C will be used by default.