찾다
시스템 튜토리얼리눅스Centos 및 Rhel의 YUM 및 DNF와 함께 소프트웨어 패키지 관리 마스터 링

Mastering Software Package Management with Yum and DNF on CentOS and RHEL

Introduction: Mastering CentOS/RHEL Software Management

Effective software package management is paramount for Linux system administrators using CentOS and Red Hat Enterprise Linux (RHEL). This guide provides a comprehensive overview of using Yum and DNF, the primary package managers for these distributions, to ensure system security, updates, and optimal performance. While Yum was the standard in earlier versions (CentOS/RHEL 7 and below), DNF (Dandified Yum) has become the default in CentOS 8 and RHEL 8 and beyond, offering superior speed, dependency resolution, and memory management.

Yum and DNF: A Detailed Comparison

Yum (Yellowdog Updater, Modified): A long-standing package manager, Yum automates the installation, updating, and removal of software packages, handling dependencies effectively.

DNF (Dandified Yum): The successor to Yum, DNF boasts improved performance, reduced memory footprint, enhanced dependency handling, and increased security features. In newer CentOS/RHEL versions, Yum often acts as a symbolic link to DNF.

Key DNF Advantages over Yum:

  • Significantly faster package management
  • Optimized memory usage
  • Robust dependency resolution
  • Enhanced security and modular design

Repository Management: Keeping Your System Current

Before any software installation or update, ensure your system repositories are up-to-date.

Using Yum (CentOS/RHEL 7 and earlier):

yum check-update
yum update

Using DNF (CentOS/RHEL 8 and later):

dnf check-update
dnf update

The update command synchronizes package lists and applies available updates.

Software Installation, Removal, and Search

Installation:

Yum: yum install package-name

DNF: dnf install package-name (e.g., dnf install httpd -y installs Apache; -y auto-confirms)

Removal:

Yum: yum remove package-name

DNF: dnf remove package-name (e.g., dnf remove httpd -y removes Apache)

Searching:

Yum: yum search package-name

DNF: dnf search package-name (e.g., dnf search nginx searches for Nginx packages)

Package Information and Management

Listing Installed Packages:

Yum: yum list installed

DNF: dnf list installed (e.g., dnf list installed | grep httpd checks for Apache)

Detailed Package Information:

Yum: yum info package-name

DNF: dnf info package-name (e.g., dnf info vim shows Vim details)

Managing Software Groups:

List Groups: dnf group list

Install Group: dnf group install "Development Tools" -y

Remove Group: dnf group remove "Development Tools" -y

Advanced Package Management Techniques

Dependency Handling:

  • Check Dependencies: dnf deplist package-name
  • Remove Unused Dependencies: dnf autoremove

Cache Management:

Yum: yum clean all

DNF: dnf clean all

Repository Control:

Enable/disable repositories (temporarily): dnf --enablerepo=repository-name install package-name or dnf --disablerepo=repository-name install package-name. For permanent changes, modify /etc/yum.repos.d/ files.

DNF Transaction History:

  • View History: dnf history
  • Undo Transaction: dnf history undo transaction-id
  • Rollback: dnf history rollback transaction-id

Local RPM Installation:

Yum: yum localinstall package.rpm

DNF: dnf install package.rpm

Security Updates:

  • Check Security Updates: dnf updateinfo list security
  • Apply Security Updates: dnf update --security

Conclusion: Optimizing Your CentOS/RHEL System

Proficient package management is vital for maintaining secure and efficient CentOS/RHEL systems. While Yum served its purpose well, DNF's enhancements make it the preferred choice for modern deployments. By mastering the commands outlined in this guide, you can effectively manage your software, ensuring system stability and security.

위 내용은 Centos 및 Rhel의 YUM 및 DNF와 함께 소프트웨어 패키지 관리 마스터 링의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
사용 방법 ' 다음 ' Linux에서 awk로 명령 - 6 부사용 방법 ' 다음 ' Linux에서 awk로 명령 - 6 부May 15, 2025 am 10:43 AM

AWK 시리즈의 여섯 번째 할부에서 우리는 중복 처리 단계를 건너 뛰어 스크립트 실행의 효율성을 향상시키는 데 도움이되는 다음 명령을 탐색 할 것입니다. 다음 명령은 무엇입니까?

Linux에서 파일을 효율적으로 전송하는 방법Linux에서 파일을 효율적으로 전송하는 방법May 15, 2025 am 10:42 AM

Linux 시스템에서 파일을 전송하는 것은 특히 로컬 또는 원격 시스템 간의 네트워크 전송과 관련하여 모든 시스템 관리자가 마스터 해야하는 일반적인 작업입니다. Linux는이 작업을 수행하기 위해 일반적으로 사용되는 두 가지 도구 인 SCP (Secure Replication) 및 RSYNC를 제공합니다. 둘 다 로컬 또는 원격 기계간에 파일을 전송하는 안전하고 편리한 방법을 제공합니다. 이 기사는 SCP 및 RSYNC 명령을 사용하여 로컬 및 원격 파일 전송을 포함하여 파일을 전송하는 방법을 자세히 설명합니다. Linux SCP 명령의 SCP (Secure Copy Protocol)는 SSH (Secure Shell)을 통해 두 호스트 간의 파일 및 디렉토리를 안전하게 복사하는 데 사용되는 명령 줄 프로그램입니다. 이는 인터넷을 통해 파일이 전송되면의 수를 의미합니다.

10 가지 가장 인기있는 Linux 데스크탑 환경10 가지 가장 인기있는 Linux 데스크탑 환경May 15, 2025 am 10:35 AM

Windows 및 Mac OS X와 ​​달리 Linux의 매혹적인 기능 중 하나는 다양한 데스크탑 환경을 지원하는 것입니다. 이를 통해 데스크탑 사용자는 컴퓨팅 요구 사항에 따라 가장 적합하고 적합한 데스크탑 환경을 선택할 수 있습니다.

Linux Desktop에 Libreoffice 24.8을 설치하는 방법Linux Desktop에 Libreoffice 24.8을 설치하는 방법May 15, 2025 am 10:15 AM

Libreoffice는 Linux, Windows 및 Mac 플랫폼을 위해 강력하고 오픈 소스 사무실 제품군으로 두드러집니다. 단어 문서, 스프레드 시트, 프레젠테이션, 도면, 계산 및 수학을 처리하기위한 다양한 기능을 자랑합니다.

Linux에서 Office Docs 만 사용하여 PDF 파일 작업 방법Linux에서 Office Docs 만 사용하여 PDF 파일 작업 방법May 15, 2025 am 09:58 AM

PDF 파일을 관리하는 Linux 사용자는 다양한 프로그램을 사용할 수 있습니다. 구체적으로, 다양한 기능을 위해 설계된 수많은 특수 PDF 도구가 있습니다. 예를 들어, 파일을 읽기 위해 PDF 뷰어를 설치하거나 PDF EDI를 설치할 수 있습니다.

awk 및 stdin을 사용하여 명령 출력을 필터링하는 방법awk 및 stdin을 사용하여 명령 출력을 필터링하는 방법May 15, 2025 am 09:53 AM

AWK 명령 시리즈의 이전 세그먼트에서 우리의 초점은 주로 파일의 입력을 읽는 데있었습니다. 그러나 stdin에서 입력을 읽어야한다면 AWK 시리즈의 7 부에서는 O의 출력을 사용할 수있는 몇 가지 예를 살펴 보겠습니다.

CLIFM- Linux의 번개 빠른 터미널 파일 관리자CLIFM- Linux의 번개 빠른 터미널 파일 관리자May 15, 2025 am 09:45 AM

Clifm은 쉘과 같은 인터페이스의 기초에 설계된 독특하고 믿을 수 없을 정도로 신속한 지휘관 파일 관리자로 두드러집니다. 즉, 사용자가 이미 익숙한 명령을 사용하여 파일 시스템에 참여할 수 있음을 의미합니다.

Linux Mint 21.3에서 Linux Mint 22로 업그레이드하는 방법Linux Mint 21.3에서 Linux Mint 22로 업그레이드하는 방법May 15, 2025 am 09:44 AM

Linux Mint 22 Wilma의 새로운 설치를 수행하지 않으려면 이전 버전에서 업그레이드 할 수있는 옵션이 있습니다.이 안내서에서는 Linux Mint 21.3 (21.x 시리즈의 최신 릴리스 릴리스)에서 업그레이드하는 프로세스를 자세히 설명합니다.

See all articles

핫 AI 도구

Undresser.AI Undress

Undresser.AI Undress

사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover

AI Clothes Remover

사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool

Undress AI Tool

무료로 이미지를 벗다

Clothoff.io

Clothoff.io

AI 옷 제거제

Video Face Swap

Video Face Swap

완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

뜨거운 도구

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

WebStorm Mac 버전

WebStorm Mac 버전

유용한 JavaScript 개발 도구

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

SublimeText3 Linux 새 버전

SublimeText3 Linux 새 버전

SublimeText3 Linux 최신 버전

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구