Offline Install
install pigsty without Internet access?
Pigsty install from Internet upstream by default, while some environments are isolated from the Internet. To address this issue, Pigsty supports offline installation from offline packages.
Download the pigsty offline package, put it to /tmp/pkg.tgz
Download the pigsty source package, extract it (assume ~/pigsty
)
cd ~/pigsty; ./bootstrap
, it will extract the pkg and use the local repo
vi ~/pigsty.yml
, overwrite node_repo_modules
to local
to use the local repo
Run ./install.yml
as usual. it will install everything from the local repo.
What is offline package?
Offline package packs all the required RPM/DEB packages and their dependencies; it is essentially a snapshot tarball of local APT / YUM repo, taken after a normal installation.
You can find these packages from the GitHub release page, for example:
df64ac0c2b5aab39dd29698a640daf2e pigsty-v3.6.0.tgz
cea861e2b4ec7ff5318e1b3c30b470cb pigsty-pkg-v3.6.0.d12.aarch64.tgz
2f253af87e19550057c0e7fca876d37c pigsty-pkg-v3.6.0.d12.x86_64.tgz
0158145b9bbf0e4a120b8bfa8b44f857 pigsty-pkg-v3.6.0.el8.aarch64.tgz
07330d687d04d26e7d569c8755426c5a pigsty-pkg-v3.6.0.el8.x86_64.tgz
311df5a342b39e3288ebb8d14d81e0d1 pigsty-pkg-v3.6.0.el9.aarch64.tgz
92aad54cc1822b06d3e04a870ae14e29 pigsty-pkg-v3.6.0.el9.x86_64.tgz
c4fadf1645c8bbe3e83d5a01497fa9ca pigsty-pkg-v3.6.0.u22.aarch64.tgz
5477ed6be96f156a43acd740df8a9b9b pigsty-pkg-v3.6.0.u22.x86_64.tgz
196169afc1be02f93fcc599d42d005ca pigsty-pkg-v3.6.0.u24.aarch64.tgz
dbe5c1e8a242a62fe6f6e1f6e6b6c281 pigsty-pkg-v3.6.0.u24.x86_64.tgz
We usually release offline packages for the following linux distro, with the latest OS minor version.
EL Distribution | Code | Arch | OS Code | Package |
---|---|---|---|---|
RockyLinux 9.6 | EL9 | x86_64 | el9.x86_64 | pigsty-pkg-v3.6.0.el9.x86_64.tgz |
Ubuntu 24.04.2 | U24 | x86_64 | u24.x86_64 | pigsty-pkg-v3.6.0.u24.x86_64.tgz |
Debian 12.11 | D12 | x86_64 | d12.x86_64 | pigsty-pkg-v3.6.0.d12.x86_64.tgz |
RockyLinux 9.6 | EL9 | x86_64 | el9.aarch64 | pigsty-pkg-v3.6.0.el9.aarch64.tgz |
Ubuntu 24.04.2 | U24 | x86_64 | u24.aarch64 | pigsty-pkg-v3.6.0.u24.aarch64.tgz |
Debian 12.11 | D12 | x86_64 | d12.aarch64 | pigsty-pkg-v3.6.0.d12.aarch64.tgz |
https://github.com/pgsty/pigsty/releases/download/v3.6.0/pigsty-pkg-v3.6.0.el9.x86_64.tgz
Offline Package is made for specific Linux OS Major.Minor Version
Using offline package on lower minor version may have a chance of success, but it is not guaranteed.
Pros and Cons
If you are using the exact same OS minor version above, using offline packages is advised.
Advantages of using offline package
- Official offline packages are tested.
- The easiest way to deliver on Internet isolated environment.
- Speed up the installation process by pre-download all packages in one-pass.
- The snapshot is ensured working without worrying about upstream dependency breakage.
Disadvantages of using offline package
- If OS minor version not match, OS rpm/deb packages may break
- It may not contain the latest updates and OS security patches.
Bootstrap
The bootstrap
script will automatically detect /tmp/pkg.tgz
and extract it to /www/pigsty
by default.
It will also set up the os package manager repo file and install ansible
and other utils.
Where are my repo files?
Bootstrap will wipe-out existing repo by default to ensure only the required repos are installed.
You can find them in /etc/yum.repos.d/backup
(EL) or /etc/apt/backup
(debian / ubuntu)
If you want to keep your existing repo
You can use the -k|--keep
parameter to keep the existing repo files intact:
./bootstrap -k # or --keep
Make offline package
If your OS choice is not in the default offline package offering list,
you can make your own offline package with the built-in cache.yml
playbook.
Find a node running exact same OS version with the Internet access
Run standard online installation procedure
cd ~/pigsty; ./cache.yml
: make and fetch the offline package to dist/${version}/
Copy the offline package to the environment without Internet access (ftp, scp, usb,...)
We offer paid service to make offline packages for precise Linux major.minor versions. ($30
)
Hybrid Approach
There's a hybrid approach to using the offline package and do online install upon it. This could be useful if your OS repo is a local Intranet repo.
Let's say you are using RockyLinux 9.5, but the official offline package is made for RockyLinux 9.6.
You can use the el9
offline packages, and remove the /www/pigsty/repo_complete
marker file,
to force Pigsty to perform a repo build stage (infra.repo
) during installation.
If you want to use the latest version or resolve any dependency conflict, you can remove these rpm/deb and run make repo
,
pigsty will re-download them from the upstream repo.