Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 1. Setting up a development workstation


Red Hat Enterprise Linux 9 supports the development of custom applications. To set up your system for development, install the required tools and utilities for the most common development use cases.

1.1. Enabling debug and source repositories

To access essential debugging data for system components, enable debug and source repositories. RHEL disables these by default to save space. Enable them to install debuginfo packages required for performance measurement and deep system troubleshooting.

Procedure

  • Enable the source and debug information package channels:

    1. Enable the BaseOS debug repository:

      # subscription-manager repos --enable rhel-9-for-$(uname -i)-baseos-debug-rpms
    2. Enable the BaseOS source repository:

      # subscription-manager repos --enable rhel-9-for-$(uname -i)-baseos-source-rpms
    3. Enable the AppStream debug repository:

      # subscription-manager repos --enable rhel-9-for-$(uname -i)-appstream-debug-rpms
    4. Enable the AppStream source repository:

      # subscription-manager repos --enable rhel-9-for-$(uname -i)-appstream-source-rpms

      + The $(uname -i) part is automatically replaced with a matching value for architecture of your system:

Expand

Architecture name

Value

64-bit Intel and AMD

x86_64

64-bit ARM

aarch64

IBM POWER

ppc64le

64-bit IBM Z

s390x

1.2. Setting up to manage application versions

Effective version control is essential to all multi-developer projects. Red Hat Enterprise Linux includes Git, a distributed version control system.

Procedure

  1. Install the git package:

    # dnf install git
  2. Optional: Set the full name associated with your Git commits:

    $ git config --global user.name "Full Name"
  3. Optional: Set the email address associated with your Git commits:

    $ git config --global user.email "email@example.com"

    Replace Full Name and email@example.com with your actual name and email address.

  4. Optional: To change the default text editor started by Git, set value of the core.editor configuration option:

    $ git config --global core.editor command

    Replace command with the command to be used to start the selected text editor.

1.3. Setting up to develop applications using C and C++

To develop C and C++ applications on Red Hat Enterprise Linux, you can use the development tools provided by Red Hat Enterprise Linux. This procedure describes how to install the standard development tools, including the GCC and LLVM toolchains.

Prerequisites

  • The debug and source repositories must be enabled.

Procedure

  1. Install the Development Tools package group including GNU Compiler Collection (GCC), GNU Debugger (GDB), and other development tools:

    # dnf group install "Development Tools"
  2. Install the LLVM-based toolchain including the clang compiler and lldb debugger:

    # dnf install llvm-toolset
  3. Optional: For Fortran dependencies, install the GNU Fortran compiler:

    # dnf install gcc-gfortran

1.4. Setting up to debug applications

To analyze and troubleshoot internal application behavior, Red Hat Enterprise Linux offers multiple debugging and instrumentation tools.

Prerequisites

  • The debug and source repositories must be enabled.

Procedure

  1. Install the tools useful for debugging:

    # dnf install gdb valgrind systemtap ltrace strace
  2. Install the dnf-utils package in order to use the debuginfo-install tool:

    # dnf install dnf-utils
  3. Run a SystemTap helper script for setting up the environment.

    # stap-prep

    Note that stap-prep installs packages relevant to the currently running kernel, which might not be the same as the actually installed kernel(s). To ensure stap-prep installs the correct kernel-debuginfo and kernel-headers packages, double-check the current kernel version by using the uname -r command and reboot your system if necessary.

  4. Make sure SELinux policies allow the relevant applications to run not only normally, but in the debugging situations, too. For more information, see Using SELinux.

1.5. Setting up tools to measure application performance

To identify the causes of application performance loss, you can use the performance measurement tools provided by Red Hat Enterprise Linux. This procedure describes how to install tools such as perf, Valgrind, SystemTap, and Performance Co-Pilot (PCP).

Prerequisites

  • The debug and source repositories must be enabled.

Procedure

  1. Install the tools for performance measurement:

    # dnf install perf papi pcp-zeroconf valgrind strace sysstat systemtap
  2. Run a SystemTap helper script for setting up the environment.

    # stap-prep

    Note that stap-prep installs packages relevant to the currently running kernel, which might not be the same as the actually installed kernel(s). To ensure stap-prep installs the correct kernel-debuginfo and kernel-headers packages, double-check the current kernel version by using the uname -r command and reboot your system if necessary.

  3. Enable the Performance Co-Pilot (PCP) collector service:

    # systemctl enable pmcd
  4. Start the Performance Co-Pilot (PCP) collector service:

    # systemctl start pmcd
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat
Retour au début