Setup CentOS for developers
CentOS is a Linux distribution that provides a free, community-supported computing platform functionally compatible with its upstream source, Red Hat Enterprise Linux (RHEL). In January 2014, CentOS announced the official joining with Red Hat while staying independent from RHEL under a new CentOS governing board.
Install basic development tools
Development Tools package group provides the GNU Compiler Collection (GCC), GNU Debugger (GDB), and other related development tools.
$ # install Development Tools bundle $ sudo yum group install "Development Tools"
Git is the most popular version control system on Linux. It is easy to use, amazingly fast, it’s very efficient with large projects, and it has an incredible branching system for non-linear development.
$ sudo yum install git
By default, CentOS is not installing python3, but we can easily setup the installation.
$ sudo yum install python3 $ $ # alias pip3 to pip $ sudo ln -s /bin/pip3 /bin/pip $ $ # install virtualenv $ sudo pip install virtualenv
And Python3 libraries for development
sudo yum install python3-devel
Apache is available within CentOS’s default software repositories, which means you can install it with the
yum package manager.
$ sudo yum install httpd
Apache does not automatically start on CentOS once the installation completes. You will need to start the Apache process manually:
$ # this cmd will start the server $ sudo systemctl start httpd $ $ # test server status $ sudo systemctl status httpd $ $ # access the default page with `lynx` $ sudo yum install lynx $ $ lynx http://localhost
$ sudo yum install nodejs $ $ # check the version $ node --version
The yarn is an advanced package management software for Node.js applications. It is a fast, secure, and reliable alternative that any other Nodejs package manager.
$ sudo npm install yarn -g $ $ # check the version $ yarn -v
Installing Container Tools
RHEL 8 does not officially support Docker; in this section, we will show how to install the new set of container tools as well as the old lady, docker package. The docker package is replaced by the Container Tools module, which consists of tools such as Podman, Buildah, Skopeo and several others.
$ dnf module install -y container-tools
Now install docker from the official repositories by running the following commands. Here, the yum-utils package provides the yum-config-manager utility.
$ dnf install yum-utils $ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo $ dnf install containerd.io docker-ce docker-ce-cli
Installation of DNF
For packages installation we can use
dnf tool instead of traditional
yum package manager. DNF is same as Yum that installs, updates and removes packages on RPM bas4ed Linux systems. DNF is introduced for improving the bottlenecks of Yum such as performance, Memory usages, Dependency resolution, speed, and some other factors.
To install DNF on RHEL/CentOS 7 systems, you need to set up and enable epel YUM REPO before installing DNF
$ # Initial Setup $ yum install epel-release $ $ # Install `DNF` tool $ yum install dnf $ $ # test the installation $ dnf –help