Installation

Script

The simplest way to install pig is to run the following installation script:

curl -fsSL https://repo.pigsty.io/pig | bash     # via Cloudflare
curl -fsSL https://repo.pigsty.cc/pig | bash     # via China Mirror

It downloads the latest pig RPM / DEB from the pigsty repo and install via rpm or dpkg.

Release

You can also download pig package (RPM/DEB/ Tarball) directly from the Latest GitHub Release Page:

Repository

The pig package is also available in the pigsty-infra repo, You can add the repo to your system, and install it with OS package manager:

For EL distribution such as RHEL,RockyLinux,CentOS,Alma Linux,OracleLinux,…:

YUM

sudo tee /etc/yum.repos.d/pigsty-infra.repo > /dev/null <<-'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.io/yum/infra/$basearch
enabled = 1
gpgcheck = 0
module_hotfixes=1
EOF

sudo yum makecache;
sudo yum install -y pig

APT

For Debian, Ubuntu and compatible Linux Distributions:

sudo tee /etc/apt/sources.list.d/pigsty-infra.list > /dev/null <<EOF
deb [trusted=yes] https://repo.pigsty.io/apt/infra generic main
EOF

sudo apt update;
sudo apt install -y pig

Upgrade

Once installed, you can self-update pig itself to the latest version with:

pig update   # upgrade pig itself to the latest available version

Build

You can also build pig from source code. It’s a go program, hosted on github.com/pgsty/pig

git clone https://github.com/pgsty/pig.git; cd pig
go get -u; go build

Uninstall

apt remove -y pig     # Debian / Ubuntu ...
yum remove -y pig     # RHEL / CentOS / RockyLinux ...
rm -rf /usr/bin/pig   # If installed via raw binary, just remove it
Last updated on