Hello, friends. In this short post, you will learn how to install Git on CentOS 9 Stream.
Git is an open source, cross-platform distributed version control system (DVCS) that was initially developed by Linus Torvalds in 2005. Believe it or not, there are a staggering number of software projects that rely on Git for version control, including commercial and open-source projects.
This makes Git a must for every developer and professional involved in the software lifecycle.
So, it’s not too complex to install Git on Linux, and today we’re going to demonstrate it for you.
Installing Git on CentOS 9 Stream
There are two ways to install Git. The first is to install it from the official CentOS repositories.
To achieve this, open a terminal and update your system
sudo dnf update
And then, install Git with the command
sudo dnf install git
Then, you can check the installed version with the command
But if you want to have the latest stable version, then the best thing to do is to compile the Git source code. To achieve this, install
wget and the basic packages to compile.
sudo dnf install wget tar gettext-devel curl-devel expat-devel expat-devel openssl-devel perl-CPAN perl-devel zlib-devel unzip cmake gcc make
Then download the latest version of the git code.
Then unzip it
tar xvzf git-2.36.0.tar.gz
Thereafter, navigate to the generated folder
Next, compile the code.
sudo make prefix=/usr/local all
Finally, install git
sudo make prefix=/usr/local install
And check the version
Thanks to this post, you learned how to install Git on CentOS 9 Stream, which is a system that still has a lot to give.