Red Hat Enterprise Linux 8 is a developer friendly Linux distribution, which supports the development of custom applications. It ships with new developer-centric features that accelerate your application development such as the most recent stable development languages, databases, tools, and container technologies on the latest hardware and cloud environments.
The importance of application development is writing code, therefore choosing the right tools, utilities and setting up the perfect development environment is essential. This article shows how to setup a developer workstation in RHEL 8.
Enabling Debug Repositories in RHEL 8
The Debug and source repositories contain useful information needed to debug various system components and measure their performance. Unfortunately, these repositories are not enabled by default on RHEL 8.
To enable debug and source repositories in RHEL 8, use the following commands.
# subscription-manager repos --enable rhel-8-for-$(uname -i)-baseos-debug-rpms # subscription-manager repos --enable rhel-8-for-$(uname -i)-baseos-source-rpms # subscription-manager repos --enable rhel-8-for-$(uname -i)-appstream-debug-rpms # subscription-manager repos --enable rhel-8-for-$(uname -i)-appstream-source-rpms
Installing Development Tools in RHEL 8
Next, we will install development tools and libraries, which will set up your system to develop or building applications using C, C++ and other common programming languages.
The “Development Tools” package group provides the GNU Compiler Collection (GCC), GNU Debugger (GDB), and other related development tools.
# dnf group install "Development Tools"
Also install the Clang and LLVM-based tool-chain which provides the LLVM compiler infrastructure framework, the Clang compiler for the C and C++ languages, the LLDB debugger, and related tools for code analysis.
# dnf install llvm-toolset
Installing Git in RHEL 8
Version control is a way of recording changes to a file or set of files over time so that you can recall specific versions later. Using a version control system, you can set up your system to manage application versions.
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.
# dnf install git
For more information about Git, check out our article: How to Use Git Version Control System in Linux [Comprehensive Guide]
Installing Debugging and Instrumentation Tools in RHEL 8
Debugging and instrumentation tools are used to track down and fix programming errors in an application under development. They help you monitor and measure performance, detect errors, and get trace information that represents the application’s state.
# dnf install gdb valgrind systemtap ltrace strace
To use the debuginfo-install tool, you should install the yum-utils package as shown.
# dnf install yum-utils
Then run a SystemTap helper script for setting up the environment: install kernel debuginfo packages. Note that the size of these packages exceeds 2 GiB.
Installing Tools to Measure Application Performance in RHEL 8
This step shows how to setup your machine to measure the performance of your applications by installing the following packages.
# dnf install perf papi pcp-zeroconf valgrind strace sysstat systemtap
Next, run a SystemTap helper script for setting up the required environment. As stated before, invoking this script installs kernel debuginfo packages whose size exceeds 2 GiB.
Then start the Performance Co-Pilot (PCP) collector service for now and enable it to auto-start at system boot.
# systemctl start pmcd # systemctl enable pmcd
Installing Container Tools in RHEL 8
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.
Let’s briefly explain the aforementioned tools:
- Podman: is a simpler, daemon-less tool that provides a command line experience similar to docker-cli. It is used to manager pods, containers and container images.
- Buildah: is a powerful build tool which is designed to provide control over how image layers are committed, and how data is accessed during builds.
- Skopeo: is a flexible utility used to move, sign, and verify container images between registry servers and container hosts.
Most importantly, the above tools are compatible with the “OCI specifications”, means they can find, run, build and share containers with other tools that target the OCI standards including Docker CE, Docker EE, Kata Containers, CRI-O, and other container engines, registries, and tools.
# dnf module install -y container-tools
Install Docker in RHEL 8
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
Next, start the docker service and enable it to auto-start at system boot.
# systemctl start docker # systemctl start docker
That’s all for now! In this article, we have shown how to setup a developer workstation using RHEL 8. If you have any questions or thoughts to share or additions to make, use the feedback form below to reach us.
2 thoughts on “How to Setup a Developer Workstation in RHEL 8”
Too cool – thank you
Oh, great! You are most welcome, thanks for the feedback.