10 July 2022

Install Git on CentOS

Okay, it’s time to install Git so you can play with some pull and merge requests for some projects you are working on. This set of instructions should work on your system regardless if you are running CentOS 7, 8, or 9.

The first thing to do is elevate…

sudo su

Then update your system.

dnf update

Install Git

dnf install git

Check the installed version

git --version

Just like that, you are ready to “Git” yourself back to coding something grand!

Category: CentOS, Git | LEAVE A COMMENT
9 July 2022

Install Docker CE on CentOS 9 Stream

Docker is an operating system virtualization tool that allows us to run applications as containers. In simplest terms, that means you are virtualizing only the application, and not creating an entire virtual machine as you would traditionally do in hypervisors like VMware, Hyper-V, or Nutanix.

Okay, that’s cool… How do we install Docker so we can start to test workloads on it? Well, let me show you how to install Docker on a virtual machine running CentOS 9 Stream.
**While I have not tested to confirm, this Docker installation method should be identical on CentOS 8 Stream, as well as for CentOS 7.x

Let us begin by shifting to Sudo mode by running this command first…

sudo su

Then the first thing to do is remove PodMan as it conflicts with Docker.

dnf -y remove podman runc

The next step is to add the Docker repo.

curl https://download.docker.com/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker-ce.repo

Update SELinux in regards to the Docker repo.

sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/docker-ce.repo

Enable the Docker repo and install Docker.

dnf --enablerepo=docker-ce-stable -y install docker-ce

With Docker installed, it is time to enable it.

systemctl start docker
systemctl enable docker

Let us view what we installed by running these two commands.

rpm -q docker-ce
docker version

Congratulations! You now have Docker installed on your machine.

You’ll probably want to install Docker Compose on your machine too so you can build and run a docker image. You can install it with this simple command.

dnf install docker-compose