Installation
How to download and install the Pigsty CLI tool `pig`
Via Script
The simplest way to install pig
is to run the following installation script:
curl -fsSL https://repo.pigsty.io/pig | bash
curl -fsSL https://repo.pigsty.cc/pig | bash
It downloads the latest pig
RPM / DEB from the pigsty repo and install via rpm
or dpkg
.
Download
You can also download pig
package (RPM
/DEB
/ Tarball) directly from the Pigsty repository:
Via APT / YUM
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:
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
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
Self-Update
Once installed, you can self-update pig
to the latest version with:
pig update # upgrade pig itself to the latest version
Build from Source
You can also build pig
from source code. It's a go program, and the source code is available on GitHub
git clone https://github.com/pgsty/pig.git
cd pig
go build