This guide shows how to install Git manually on a low-memory Oracle Cloud Free Tier instance running Oracle Linux 9.x.
- Oracle Linux 9.7
- Architecture:
x86_64 - RAM: 512 MB
- Swap: 2 GB
- Goal: Avoid
dnfhangs and source compilation
cat /etc/os-release
uname -mExpected output:
Oracle Linux Server 9.x
x86_64
mkdir ~/git-rpms
cd ~/git-rpmswget 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.rpmBecause 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.rpmgit --versionExpected output:
git version 2.47.3
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"Verify:
git config --listmkdir test-git
cd test-git
git initExpected output:
Initialized empty Git repository
On Oracle Cloud Free Tier instances with only 512 MB RAM:
dnf install gitmay 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.
This installation skips optional Perl packages and documentation.
Basic commands work normally:
git clonegit pullgit pushgit commitgit branch
Optional features such as email patch workflows are not installed.
Git 2.47.3
Oracle Linux 9.x
x86_64