Community Tutorials RHEL / Rocky / AlmaLinux أساسيات مدير الحزم DNF على RHEL 9
أساسيات مدير الحزم DNF على RHEL 9
RHEL / ROCKY / ALMALINUX

أساسيات مدير الحزم DNF على RHEL 9

SKYLINE Knowledge Base
Photo by imattsmart on Unsplash

دليل عملي خطوة بخطوة لـ أساسيات مدير الحزم DNF على RHEL 9. أوامر مختبرة في الإنتاج، متطلبات مسبقة، تحقق نهائي وروابط لمواضيع ذات صلة.

dnf هو مدير الحزم على كل توزيعة من عائلة RHEL منذ RHEL 8 — Rocky، Alma، Oracle Linux، Fedora. لقد حلّ محل yum، رغم أن yum لا يزال موجودًا كـ symlink. يغطي هذا الدليل الأوامر التي تشغلها أسبوعيًا.

المتطلبات المسبقة

  • Rocky 9 / Alma 9 / RHEL 9 مع sudo.
  • اتصال HTTPS بالمرايا المكوّنة.

الخطوة 1: تحديث البيانات الوصفية وقائمة التحديثات

sudo dnf check-update              # exit 100 = توجد تحديثات
sudo dnf list --installed | wc -l
sudo dnf list --upgrades

الخطوة 2: التثبيت، الإزالة، البحث

sudo dnf install -y vim git tmux
sudo dnf remove  -y unwanted-pkg
dnf search redis
dnf info redis
dnf provides /usr/bin/openssl

الخطوة 3: الترقيات

sudo dnf upgrade -y
sudo dnf upgrade --security -y
sudo dnf upgrade --refresh -y

بعد تحديث النواة:

sudo dnf needs-restarting -r

الخطوة 4: المستودعات

dnf repolist
dnf repolist --all
sudo dnf config-manager --enable crb
sudo dnf install -y epel-release
sudo dnf config-manager --add-repo https://example.com/repo.repo

الخطوة 5: الوحدات والـ streams

dnf module list nodejs
sudo dnf module enable -y nodejs:20
sudo dnf module install -y nodejs:20/common
sudo dnf module reset nodejs

الخطوة 6: التنظيف والقفل

sudo dnf clean all
sudo dnf install -y python3-dnf-plugin-versionlock
sudo dnf versionlock add postgresql-server
sudo dnf versionlock list

التحقق

sudo dnf history list | head
sudo dnf history info 5
sudo dnf history undo 5

الخاتمة

dnf هو نفس صندوق أدوات apt على Debian/Ubuntu، فقط بكتابة مختلفة. تعلم الأوامر الأساسية وستكون 95% جاهزًا لإدارة RHEL.

الخطوات التالية

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship RHEL / Rocky / AlmaLinux for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.