Installing Git On A DirectAdmin CentOS Server

Git is available via yum and can be installed with 'yum install git -y':

yum install git -y

You can now confirm git is installed:

[[email protected]]# git --version
git version
[[email protected]]# 

You could quickly get up and running with Git via Yum as demonstrated above, but it installs version 1.8 as of July 2019. For most users, this is perfectly fine, but if there is some feature that you need that is only present in the later versions, you will need to install from source to have that feature.

To install from the source, go ahead and log into your server via SSH as the root user.

First, visit
1)   v2.9.5.tar.gz, this is the latest version as of writing, so please check for newer releases here
Left-click on the tar.gz link for that version and 'Copy Link Location'. Now, back in the terminal, run the following commands (but change the wget url/version accordingly for the version you are installing):

yum install gettext-devel -y
cd /usr/local/bin/
tar -zxf v2.9.5.tar.gz
cd git-*
make configure
./configure --prefix=/usr
make all doc info make install install-doc install-html install-info

Now confirm the version of git installed:

[[email protected] git-2.9.5]# git --version
git version 2.9.5
[[email protected] git-2.9.5]# 

That's it! :) Git is now installed.

Note that you can use Git itself from now onward to update Git, like so:

cd /usr/local/bin/
git clone
[[email protected] bin]# git clone
Cloning into 'git'...
remote: Enumerating objects: 271307, done.
remote: Total 271307 (delta 0), reused 0 (delta 0), pack-reused 271307
Receiving objects: 100% (271307/271307), 120.29 MiB | 12.03 MiB/s, done.
Resolving deltas: 100% (201377/201377), done.
[[email protected] bin]# 
[[email protected] bin]# git --version
git version 2.9.5
[[email protected] bin]# 

If you require assistance with this, remember we're here to help! Feel free to open a support ticket and we'll be glad to run these commands for you. :)

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to reinstall DirectAdmin in your web server?

Run the following commands to install: cd /usr/local/directadmin./directadmin i./directadmin p

How to install imagick with custombuild of DA?

Run the following command: cd /usr/local/directadmin/custombuild ./build update ./build...

The service ‘exim’ on server xxx is currently down

Rebuild your exim. cd /usr/local/directadmin/custombuild./build update./build set exim...

Change DA port to your choice where CSF installed

Here I will show you how to change the port from 2222 to 9999 in two steps. Step One:...

How to migrate cPanel account to DirectAdmin?

The cPanel conversion script currently only works for Admin Level restores. You must have to be...