Skip to content

Instantly share code, notes, and snippets.

@thatal
Created June 12, 2026 11:28
Show Gist options
  • Select an option

  • Save thatal/8fe3db5ad9bc7876c086b099f95d068c to your computer and use it in GitHub Desktop.

Select an option

Save thatal/8fe3db5ad9bc7876c086b099f95d068c to your computer and use it in GitHub Desktop.
Installing Git on Oracle Linux 9 with 512 MB RAM (Without DNF)

Installing Git on Oracle Linux 9 with 512 MB RAM (Without DNF)

This guide shows how to install Git manually on a low-memory Oracle Cloud Free Tier instance running Oracle Linux 9.x.

Environment

  • Oracle Linux 9.7
  • Architecture: x86_64
  • RAM: 512 MB
  • Swap: 2 GB
  • Goal: Avoid dnf hangs and source compilation

Verify System Information

cat /etc/os-release
uname -m

Expected output:

Oracle Linux Server 9.x
x86_64

Create a Working Directory

mkdir ~/git-rpms
cd ~/git-rpms

Download Git RPMs

wget https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/git-core-2.47.3-1.el9_6.x86_64.rpm

wget https://yum.oracle.com/repo/OracleLinux/OL9/appstream/x86_64/getPackage/git-2.47.3-1.el9_6.x86_64.rpm

Install Without Dependencies

Because dnf may hang on low-memory instances, install using rpm --nodeps:

sudo rpm -ivh --nodeps git-core-2.47.3-1.el9_6.x86_64.rpm

sudo rpm -ivh --nodeps git-2.47.3-1.el9_6.x86_64.rpm

Verify Installation

git --version

Expected output:

git version 2.47.3

Configure Git

git config --global user.name "Your Name"

git config --global user.email "your-email@example.com"

Verify:

git config --list

Test Git

mkdir test-git
cd test-git

git init

Expected output:

Initialized empty Git repository

Why This Approach?

On Oracle Cloud Free Tier instances with only 512 MB RAM:

  • dnf install git may hang while resolving dependencies.
  • Building Git from source may fail due to memory limitations.
  • Installing RPMs directly is lightweight and fast.
  • Core Git functionality works normally.

Notes

This installation skips optional Perl packages and documentation.

Basic commands work normally:

  • git clone
  • git pull
  • git push
  • git commit
  • git branch

Optional features such as email patch workflows are not installed.


Installed Version

Git 2.47.3
Oracle Linux 9.x
x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment