O'Reilly logo

Mobile DevOps by Jhalak Modi, Rohin Tak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Installing Git on CentOS/RHEL servers

To install Git on a CentOS or RHEL server, follow these steps:

  1. From your shell, install Git using yum (or dnf on older versions of Fedora):
$ sudo yum install git

Or:

$ sudo dnf install git  
  1. Verify the installation was successful by typing the following command:
$ git --version  
  1. Configure the username and email address for all repositories:
$ git config --global user.name "firstname lastname"
$ git config --global user.email "email@gmail.com"  
  1. Install the necessary build dependencies using dnf (or yum on older versions of Fedora):
$ sudo dnf install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel asciidoc xmlto docbook2X  

Or using the yum-Epel repo:

$ sudo yum install ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required