راهنمای تنظیم ریپوهای پابلیک
تنظیم کامل ریپوهای EPEL، AlmaLinux، Debian و Ubuntu
این راهنما شامل تنظیمات کامل ریپوهای پابلیک برای سیستمهای مختلف Linux است. این ریپوها در دیتاسنتر ما در آدرس repo.abrha.net قرار دارند و جایگزین ریپوهای اصلی هر دیسترو میشوند.
- سرعت بالاتر در دانلود بستهها
- کاهش استفاده از پهنای باند اینترنت
- دسترسی سریعتر به بستهها
- پایداری بالا و آپتایم عالی
تنظیم EPEL Repository
EPEL (Extra Packages for Enterprise Linux) مجموعهای از بستههای اضافی برای سیستمهای Enterprise Linux است.
- EPEL 8 (CentOS/RHEL 8)
- EPEL 9 (CentOS/RHEL 9)
- EPEL 10 (CentOS/RHEL 10)
# Create repository file
sudo tee /etc/yum.repos.d/epel.repo << 'EOF'
[epel]
name=Extra Packages for Enterprise Linux 8 - $basearch
baseurl=https://repo.abrha.net/epel/8/Everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-8
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 8 - $basearch - Debug
baseurl=https://repo.abrha.net/epel/8/Everything/$basearch/debug/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-8
[epel-source]
name=Extra Packages for Enterprise Linux 8 - Source
baseurl=https://repo.abrha.net/epel/8/Everything/SRPMS/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-8
EOF
# Create repository file
sudo tee /etc/yum.repos.d/epel.repo << 'EOF'
[epel]
name=Extra Packages for Enterprise Linux 9 - $basearch
baseurl=https://repo.abrha.net/epel/9/Everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-9
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 9 - $basearch - Debug
baseurl=https://repo.abrha.net/epel/9/Everything/$basearch/debug/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-9
[epel-source]
name=Extra Packages for Enterprise Linux 9 - Source
baseurl=https://repo.abrha.net/epel/9/Everything/SRPMS/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-9
EOF
# Create repository file
sudo tee /etc/yum.repos.d/epel.repo << 'EOF'
[epel]
name=Extra Packages for Enterprise Linux 10 - $basearch
baseurl=https://repo.abrha.net/epel/10/Everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-10
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 10 - $basearch - Debug
baseurl=https://repo.abrha.net/epel/10/Everything/$basearch/debug/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-10
[epel-source]
name=Extra Packages for Enterprise Linux 10 - Source
baseurl=https://repo.abrha.net/epel/10/Everything/SRPMS/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/epel/RPM-GPG-KEY-EPEL-10
EOF
پس از اضافه کردن ریپو، حتماً دستور sudo yum clean all && sudo yum makecache
را اجرا کنید.
تنظیم AlmaLinux Repository
AlmaLinux جایگزین رایگان و متنباز CentOS است که پشتیبانی بلندمدت دارد.
- AlmaLinux 8
- AlmaLinux 9
- AlmaLinux 10
# Create repository file
sudo tee /etc/yum.repos.d/almalinux.repo << 'EOF'
[almalinux-baseos]
name=AlmaLinux $releasever - BaseOS
baseurl=https://repo.abrha.net/almalinux/$releasever/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-8
[almalinux-appstream]
name=AlmaLinux $releasever - AppStream
baseurl=https://repo.abrha.net/almalinux/$releasever/AppStream/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-8
[almalinux-extras]
name=AlmaLinux $releasever - Extras
baseurl=https://repo.abrha.net/almalinux/$releasever/extras/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-8
[almalinux-powertools]
name=AlmaLinux $releasever - PowerTools
baseurl=https://repo.abrha.net/almalinux/$releasever/PowerTools/$basearch/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-8
EOF
# Create repository file
sudo tee /etc/yum.repos.d/almalinux.repo << 'EOF'
[almalinux-baseos]
name=AlmaLinux $releasever - BaseOS
baseurl=https://repo.abrha.net/almalinux/$releasever/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-9
[almalinux-appstream]
name=AlmaLinux $releasever - AppStream
baseurl=https://repo.abrha.net/almalinux/$releasever/AppStream/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-9
[almalinux-extras]
name=AlmaLinux $releasever - Extras
baseurl=https://repo.abrha.net/almalinux/$releasever/extras/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-9
[almalinux-crb]
name=AlmaLinux $releasever - CRB
baseurl=https://repo.abrha.net/almalinux/$releasever/CRB/$basearch/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-9
EOF
# Create repository file
sudo tee /etc/yum.repos.d/almalinux.repo << 'EOF'
[almalinux-baseos]
name=AlmaLinux $releasever - BaseOS
baseurl=https://repo.abrha.net/almalinux/$releasever/BaseOS/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-10
[almalinux-appstream]
name=AlmaLinux $releasever - AppStream
baseurl=https://repo.abrha.net/almalinux/$releasever/AppStream/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-10
[almalinux-extras]
name=AlmaLinux $releasever - Extras
baseurl=https://repo.abrha.net/almalinux/$releasever/extras/$basearch/os/
enabled=1
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-10
[almalinux-crb]
name=AlmaLinux $releasever - CRB
baseurl=https://repo.abrha.net/almalinux/$releasever/CRB/$basearch/os/
enabled=0
gpgcheck=1
gpgkey=https://repo.abrha.net/almalinux/RPM-GPG-KEY-AlmaLinux-10
EOF
تنظیم Debian Repository
Debian یکی از قدیمیترین و پایدارترین توزیعهای Linux است.
- Debian 10 (Buster)
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
- Debian 13 (Trixie)
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Debian 10 Buster
deb https://repo.abrha.net/debian buster main contrib non-free
deb https://repo.abrha.net/debian buster-updates main contrib non-free
deb https://repo.abrha.net/debian buster-backports main contrib non-free
deb https://repo.abrha.net/debian-security buster/updates main contrib non-free
EOF
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Debian 11 Bullseye
deb https://repo.abrha.net/debian bullseye main contrib non-free
deb https://repo.abrha.net/debian bullseye-updates main contrib non-free
deb https://repo.abrha.net/debian bullseye-backports main contrib non-free
deb https://repo.abrha.net/debian-security bullseye-security main contrib non-free
EOF
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Debian 12 Bookworm
deb https://repo.abrha.net/debian bookworm main contrib non-free non-free-firmware
deb https://repo.abrha.net/debian bookworm-updates main contrib non-free non-free-firmware
deb https://repo.abrha.net/debian bookworm-backports main contrib non-free non-free-firmware
deb https://repo.abrha.net/debian-security bookworm-security main contrib non-free non-free-firmware
EOF
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Debian 13 Trixie
deb https://repo.abrha.net/debian trixie main contrib non-free non-free-firmware
deb https://repo.abrha.net/debian trixie-updates main contrib non-free non-free-firmware
deb https://repo.abrha.net/debian trixie-backports main contrib non-free non-free-firmware
deb https://repo.abrha.net/debian-security trixie-security main contrib non-free non-free-firmware
EOF
پس از تغییر ریپو، حتماً دستور sudo apt update
را اجرا کنید.
تنظیم Ubuntu Repository
Ubuntu یکی از محبوبترین توزیعهای Linux برای دسکتاپ و سرور است.
- Ubuntu 20.04 LTS (Focal Fossa)
- Ubuntu 22.04 LTS (Jammy Jellyfish)
- Ubuntu 24.04 LTS (Noble Numbat)
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Ubuntu 20.04 LTS Focal
deb https://repo.abrha.net/ubuntu focal main restricted universe multiverse
deb https://repo.abrha.net/ubuntu focal-updates main restricted universe multiverse
deb https://repo.abrha.net/ubuntu focal-backports main restricted universe multiverse
deb https://repo.abrha.net/ubuntu focal-security main restricted universe multiverse
EOF
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Ubuntu 22.04 LTS Jammy
deb https://repo.abrha.net/ubuntu jammy main restricted universe multiverse
deb https://repo.abrha.net/ubuntu jammy-updates main restricted universe multiverse
deb https://repo.abrha.net/ubuntu jammy-backports main restricted universe multiverse
deb https://repo.abrha.net/ubuntu jammy-security main restricted universe multiverse
EOF
# Backup original sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
# Create new sources.list
sudo tee /etc/apt/sources.list << 'EOF'
# Ubuntu 24.04 LTS Noble
deb https://repo.abrha.net/ubuntu noble main restricted universe multiverse
deb https://repo.abrha.net/ubuntu noble-updates main restricted universe multiverse
deb https://repo.abrha.net/ubuntu noble-backports main restricted universe multiverse
deb https://repo.abrha.net/ubuntu noble-security main restricted universe multiverse
EOF
پس از تغییر ریپو، حتماً دستور sudo apt update
را اجرا کنید.
نگهداری و بهروزرسانی
برای اطمینان از عملکرد بهینه ریپوها، بهروزرسانیهای دورهای و بررسیهای منظم توصیه میشود.
- برای سیستمهای مبتنی بر
sudo yum update
:YUM (EPEL, AlmaLinux) - برای سیستمهای مبتنی بر
sudo apt update && sudo apt upgrade
:APT (Debian, Ubuntu) - بررسی سلامت ریپوها:
sudo yum repolist
یاsudo apt-cache policy