Software
Locale, Firewall, Ansible, Pigsty...
Linux
Pigsty runs on Linux Operating System, it supports 10 mainstream Linux distros: Compatible OS List
We recommend using RockyLinux 9.5, Debian 12.10, or Ubuntu 24.04.5 as the default OS options.
Run pigsty on macOS?
You can install pigsty on macOS, and initiate control from your local laptop with ansible
. (use as admin node)
But the database / infra / node / etcd services are still running on Linux nodes.
We strongly recommend using a clean installed OS environment with en_US
set as the primary language.
How to enable en_US locale?
To ensure the en_US
locale is available when using other primary language:
localedef -i en_US -f UTF-8 en_US.UTF-8
localectl set-locale LANG=en_US.UTF-8
Pigsty DOES NOT use containers, main components are packed for specific distro major version.
Use the same OS version on all nodes
Please use the same major and minor version of the OS on all nodes in a single deployment.
Firewall
Your security policy and firewall setup should allow access to the required ports.
To access the WebUI services, you'll have to allow the HTTP (80
) / HTTPS (443
) access.
To access the PostgreSQL database services, you'll have to allow the 5432
port for postgres.
You may access postgres services via other ports
5432
: PostgreSQL database6432
: Pgbouncer Connection Pooler5433
: PG Primary Service5434
: PG Replica Service5436
: PG Default Service5438
: PG Offline Service
If you are accessing the postgres services via other ports, allow them accordingly
In a typical public cloud VPS setup, port 22/80/443/5432
are usually opened.
Expose database ports with caution
Exposing database service ports directly to the Internet is very dangerous. If you need to do this, consider consulting Security Best Practices and proceed with caution.
In a typical production setup, port 22/80/443
are opened to DBA/OPS from LAN / Jumpserver.
And other ports are accessed from intranet. You have to make sure they are opened internally: used ports.
Ansible
Pigsty uses Ansible to initiate control from admin node to all managed nodes.
You don't need to care about details, ansible is installed during the Bootstrap stage.
Install Ansible Manually
sudo dnf install -y ansible python3.12-jmespath
sudo apt install -y ansible python3-jmespath
sudo yum install -y ansible python-jmespath
brew install ansible
pip3 install jmespath
Ansible is only required on admin node, you can run ansible on macOS to use your laptop as admin node.
Pigsty
(RECOMMENDED) You can get & extract the latest stable version of pigsty source with:
curl -fsSL https://repo.pigsty.io/get | bash; cd ~/pigsty
curl -fsSL https://repo.pigsty.cc/get | bash; cd ~/pigsty # china mirror
To install a specific version, pass the version string as the first parameter:
curl -fsSL https://repo.pigsty.io/get | bash -s v3.5.0; cd ~/pigsty
curl -fsSL https://repo.pigsty.cc/get | bash -s v3.5.0; cd ~/pigsty # china mirror
You can also use git
to clone the Pigsty source repo from GitHub:
git clone https://github.com/pgsty/pigsty.git; cd ~/pigsty
Checkout a specific version before using
The default main
branch may in an unstable development status, git checkout <version>
before using.
You can also download the pigsty src (pigsty-<version>.tar.gz
) from GitHub Release Page manully:
wget https://repo.pigsty.io/srcpigsty-v3.5.0.tgz
wget https://pigsty.cc/pgsty/pigsty/releases/download/v3.5.0/pigsty-v3.5.0.tgz
wget https://github.com/pgsty/pigsty/releases/download/v3.5.0/pigsty-v3.5.0.tgz
[vagrant@node-1 ~]$ curl https://repo.pigsty.cc/get | bash -s v3.5.0
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5541 100 5541 0 0 11890 0 --:--:-- --:--:-- --:--:-- 11916
[v3.5.0] ===========================================
$ curl -fsSL https://repo.pigsty.cc/get | bash
[Site] https://pigsty.cc
[Demo] https://demo.pigsty.cc
[Repo] https://github.com/pgsty/pigsty
[Docs] /docs/install
[Download] ===========================================
[ OK ] version = v3.5.0 (from arg)
curl -fSL https://repo.pigsty.cc/src/pigsty-v3.5.0.tgz -o /tmp/pigsty-v3.5.0.tgz
######################################################################## 100.0%
[ OK ] md5sums = df30f2599a6416eea11acfd0f05ee14b /tmp/pigsty-v3.5.0.tgz
[Install] ===========================================
[ OK ] install = /home/vagrant/pigsty, from /tmp/pigsty-v3.5.0.tgz
[TodoList] ===========================================
cd /home/vagrant/pigsty
./bootstrap # [OPTIONAL] install ansible & use offline package
./configure # [OPTIONAL] preflight-check and config generation
./install.yml # install pigsty modules according to your config.
[Complete] ===========================================
If your environment does not have Internet access, consider downloading offline packages along with source tarball and upload them to your nodes. check Offline Installation for details.