From the course: Git for System Administration

Installing Git on Fedora/CentOS - Git Tutorial

From the course: Git for System Administration

Start my 1-month free trial

Installing Git on Fedora/CentOS

- [Instructor] There are multiple ways of installing software on Linux, however, the best way is to get packages from the software repositories. In this manner, the packages are cryptographically signed and guaranteed safe. Also, it's incredibly easy to install software this way, taking just a moment. The process for installing Git on Fedora, or CentOS Linux, is nearly identical. Log into the Linux host and open a terminal. If you're on CentOS 7 Linux, type into the terminal, sudo space yum space install space -y space git, and hit Enter. Type in your password if prompted. If you're using Fedora, you can usually type in the same commands, although it may remind you that yum has been replaced by DNF. Replace yum with DNF in your command string and it won't complain, either one works still. After Git is installed, type in clear, then type in git space --version to check the version. As Git is the system used by Linux to manage source files, it's included in the software repositories, and easy to install. In other versions of Linux or Unix, the package manager may differ. For instance, in Ubuntu or Debian, you'll use apt-get install git, for Gentoo Linux, you'll use emerge, for Arch Linux, type in pacman space -S space git, for openSUSE, use zypper install git, for Mageia, use urpmi space git. In other types of Unix, the commands will differ again. For FreeBSD, type in pkg install git, and for openBSD, you'll use pkg_add space git, and for Solaris, pkgutil space -i space git, and lastly, for Solaris 11 Express, you'll use pkg space install. It's recommended in all of these instances to install the version that comes with the operating system. However, in some cases, the OS version may be older than we want. In that case, you will want to install from source code. We will be doing this for Enterprise Linux 7 in the next video.

Contents