Linux Level 02 – Day 07: Install a Package¶
This document explains how to install the git package on multiple Linux servers using the yum package manager. The objective is to ensure that all application servers have Git installed to meet application deployment requirements.
- Linux Level 02 – Day 07: Install a Package
- Objective
- Understanding the Requirement
- Step 1: Install on stapp01
- Step 2: Install on stapp02
- Step 3: Install on stapp03
- Deep Dive: How yum Works
- Command Breakdown
- Validation Across Servers
- Key Outcome
Objective¶
Install the git package on the following servers:
stapp01stapp02stapp03
Package Manager: yum (used in CentOS/RHEL-based systems)
Understanding the Requirement¶
Git is a distributed version control system used for tracking changes in source code. Many DevOps workflows depend on Git for pulling repositories, managing branches, and handling CI/CD pipelines.
Since these servers host applications, Git must be available system-wide.
Installing a package requires elevated privileges because it modifies protected system directories such as /usr/bin, /etc, and /var/lib.
Step 1: Install on stapp01¶
Connect to the first server:
ssh tony@stapp01
# Password: Ir0nM@n
Install Git using sudo privileges:
sudo yum install git -y
# Password: Ir0nM@n (if prompted)
Verify installation:
git --version
Exit session:
exit
Step 2: Install on stapp02¶
Connect to the second server:
ssh steve@stapp02
# Password: Am3ric@
Install Git:
sudo yum install git -y
Verify:
git --version
Exit session:
exit
Step 3: Install on stapp03¶
Connect to the third server:
ssh banner@stapp03
# Password: BigGr33n
Install Git:
sudo yum install git -y
Verify:
git --version
Exit session:
exit
Deep Dive: How yum Works¶
yum (Yellowdog Updater Modified) is a package management utility used in Red Hat-based Linux distributions.
When you run:
sudo yum install git -y
The system performs these steps:
- Connects to configured repositories
- Checks dependency requirements
- Downloads required packages
- Verifies package signatures (GPG check)
- Installs files into system directories
- Updates the RPM database
Command Breakdown¶
sudo→ Executes command with root privilegesyum→ Package managerinstall→ Action to install packagegit→ Package name-y→ Automatically answer "yes" to prompts
The -y flag is important for automation scripts because it prevents interactive confirmation prompts.
Validation Across Servers¶
To confirm Git is installed successfully on each server:
git --version
Expected output format:
git version X.Y.Z
Key Outcome¶
The git package is installed and available on all three application servers (stapp01, stapp02, and stapp03). Each server is now prepared to handle version-controlled application workflows.