# install-packages **Repository Path**: zjh95/install-packages ## Basic Information - **Project Name**: install-packages - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-23 - **Last Updated**: 2026-06-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # install-packages Script for automating linux package installs in online and air-gapped environments --- ## Table of Contents - [Quick Start](#quick-start) - [Pre-requisites](#pre-requisites) - [Limitations](#limitations) - [Usage](#usage) --- ## Quick Start New here? `install_packages.sh` installs OS packages in three modes: straight from the internet (`online`), or by pre-downloading them on a connected host (`save`) so you can install them later on an **air-gapped** machine (`offline`). **Prerequisites** - A supported OS: Ubuntu/Debian, RHEL/CentOS/Rocky/AlmaLinux/Fedora, or SLES/openSUSE Leap - `root` / `sudo` - Internet access for `online` and `save` (not needed for `offline`) **1. Get the script** ```bash git clone https://github.com/Chubtoad5/install-packages.git cd install-packages chmod +x install_packages.sh ``` **2. Pick a mode, then list the packages you want** ```bash # Install now, from the internet: sudo ./install_packages.sh online curl jq git # Download the packages into a tarball to carry to an air-gapped host: sudo ./install_packages.sh save curl jq git # On the air-gapped host (with the saved tarball in this folder), install with no internet: sudo ./install_packages.sh offline curl jq git ``` > The offline host must run the **same OS version** as the host that created the tarball, or you'll > hit dependency errors. The script does **not** add third-party repos or GPG keys (e.g. `docker-ce`, > `kubectl`) — set those up first. See [Usage](#usage) below for the full parameter reference. ## Pre-requisites - Supported operating systems: ```ubuntu|debian|rhel|centos|rocky|almalinux|fedora|sles|opensuse-leap``` - Internet connection when using 'online' and/or 'save' - When using 'offline' a pre-generated tarball from 'save' must be copied to the same directory the script is running - When using 'offline' the air-gapped host operating system must be the same version and kernel as the host that generated the tarball to avoid package dependency errors ## Limitations - install_packages.sh does not automatically add repositories or GPG keys. Packages that require special repository handling, such as docker-ce, or kubectl must be added prior to running this script. ## Usage ``` git clone https://github.com/Chubtoad5/install-packages.git cd install-packages chmod +x install_packages.sh sudo ./install_packages.sh ``` ``` Usage: install_packages.sh [offline] [save] [online] [package1 package2 package3 ...] This script must be run with root privileges. At least one parameter is required followed by a list of packages to install. [save] and [online] may be used together followed by the package(s) list. [offline] must be used alone followed by the package(s) list. Parameters: offline : Installs packages from an offline tarball that was generated by this script. Tarball must be placed in the same directory as this script. Offline host must be running the same OS type and version. save : Downloads and saves packages and dependencies as an offline install tarball. online : Install packages and dependenciesfrom the internet using default package manager repositories. [package(s)...] : A space separated list of package names to process. Example: Only install the packages: sudo ./install_packages.sh online python3 python3-pip Only save the packages: sudo ./install_packages.sh save python3 python3-pip Save and install the packages: sudo ./install_packages.sh save online python3 python3-pip Install packages from an offline tarball: sudo ./install_packages.sh offline python3 python3-pip ``` --- ## Upstream / Credits This project uses the host distribution's package toolchains (apt/dpkg, dnf/createrepo_c, zypper); all credit to their distributions. See [NOTICE](NOTICE). When building an offline package repository it redistributes OS distribution packages — **each package keeps its own upstream license**; this project only repackages them for offline install. ## License Licensed under the **Apache License 2.0** — see [LICENSE](LICENSE) and [NOTICE](NOTICE).