Dalam panduan ini kita akan mempelajari bagaimana membuat Server repositori
Mirror CentOS 8 dengan menggunakan Rsync dan Nginx. Mirror Server CentOS 8 bertugas melayani klien lokal dan juga secara berkala melakukan update (pembaruan) ke server repositori pusat. Dengan demikian maka klien yang berada di jaringan lokal dapat melakukan konfigurasi dengan mengakses paket-paket yang terdapat pada Server mirror CentOS 8 tanpa memerlukan akses internet. Sehingga hal ini akan meningkatkan keamanan dan mengurangi konsumsi bandwidth. Dalam pengaturan ini, kita menggunakan server CentOS 8 sebagai sistem operasinya. Dan yang terpenting kita harus memiliki kapasitas penyimpanan yang cukup untuk menampung paket repositori dan potensi penambahan/pertumbuhan kedepannya.
Step 1 : Install Nginx
Update paket
[root@localhost ~]# yum update
Last metadata expiration check: 0:55:28 ago on Sat 13 Feb 2021 11:09:36 PM WIB.
Dependencies resolved.
Nothing to do.
Complete!
Install Nginx
[root@localhost ~]# dnf -y install nginx
Last metadata expiration check: 0:58:48 ago on Sat 13 Feb 2021 11:09:36 PM WIB.
Dependencies resolved.
=====================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================
Installing:
nginx x86_64 1:1.14.1-9.module_el8.0.0+184+e34fea82 appstream 570 k
Installing dependencies:
dejavu-fonts-common noarch 2.35-7.el8 baseos 74 k
dejavu-sans-fonts noarch 2.35-7.el8 baseos 1.6 M
fontconfig x86_64 2.13.1-3.el8 baseos 275 k
fontpackages-filesystem noarch 1.44-22.el8 baseos 16 k
...
...
perl-macros-4:5.26.3-419.el8.x86_64
perl-parent-1:0.237-1.el8.noarch
perl-podlators-4.11-1.el8.noarch
perl-threads-1:2.21-2.el8.x86_64
perl-threads-shared-1.58-2.el8.x86_64
Complete!
Setelah instalasi selesai, kemudian aktifkan service nginx (start & enable)
[root@localhost ~]# systemctl start nginx [root@localhost ~]# systemctl enable --now nginx Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.
Pastian service nginx telah berjalan dengan baik
[root@localhost ~]# systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disab>
Active: active (running) since Sun 2021-02-14 00:11:03 WIB; 26s ago
Main PID: 8031 (nginx)
Tasks: 5 (limit: 11371)
Memory: 7.6M
CGroup: /system.slice/nginx.service
├─8031 nginx: master process /usr/sbin/nginx
├─8032 nginx: worker process
├─8033 nginx: worker process
├─8034 nginx: worker process
└─8035 nginx: worker process
Feb 14 00:11:03 localhost.localdomain systemd[1]: Starting The nginx HTTP and reverse p>
Feb 14 00:11:03 localhost.localdomain nginx[8027]: nginx: the configuration file /etc/n>
Feb 14 00:11:03 localhost.localdomain nginx[8027]: nginx: configuration file /etc/nginx>
Feb 14 00:11:03 localhost.localdomain systemd[1]: Started The nginx HTTP and reverse pr>
lines 1-17/17 (END)
Aktifkan layanan http dan https pada firewall, secara permanen
[root@localhost ~]# firewall-cmd --add-service=http --permanent success [root@localhost ~]# firewall-cmd --add-service=https --permanent success [root@localhost ~]# firewall-cmd --reload success
Instal paket-paket pendukung yang dibutuhkan
[root@localhost ~]# dnf -y install tree policycoreutils-python-utils rsync wget nano
Last metadata expiration check: 1:14:02 ago on Sat 13 Feb 2021 11:09:36 PM WIB.
Dependencies resolved.
========================================================================================
Package Arch Version Repo Size
========================================================================================
Installing:
policycoreutils-python-utils noarch 2.9-12.el8 baseos 252 k
rsync x86_64 3.1.3-12.el8 baseos 405 k
tree x86_64 1.7.0-15.el8 baseos 59 k
wget x86_64 1.19.5-10.el8 appstream 734 k
Installing dependencies:
checkpolicy x86_64 2.9-1.el8 baseos 348 k
python3-audit x86_64 3.0-0.17.20191104git1c2f876.el8 baseos 86 k
python3-libsemanage x86_64 2.9-6.el8 baseos 127 k
python3-policycoreutils noarch 2.9-12.el8 baseos 2.2 M
python3-setools x86_64 4.3.0-2.el8 baseos 626 k
Transaction Summary
========================================================================================
Install 9 Packages
Total download size: 4.8 M
Installed size: 14 M
Downloading Packages:
(1/9): wget-1.19.5-10.el8.x86_64.rpm 7.1 MB/s | 734 kB 00:00
(2/9): checkpolicy-2.9-1.el8.x86_64.rpm 2.6 MB/s | 348 kB 00:00
(3/9): policycoreutils-python-utils-2.9-12.el8.noarch.r 1.9 MB/s | 252 kB 00:00
(4/9): python3-libsemanage-2.9-6.el8.x86_64.rpm 6.3 MB/s | 127 kB 00:00
(5/9): python3-audit-3.0-0.17.20191104git1c2f876.el8.x8 1.5 MB/s | 86 kB 00:00
(6/9): python3-setools-4.3.0-2.el8.x86_64.rpm 9.7 MB/s | 626 kB 00:00
(7/9): rsync-3.1.3-12.el8.x86_64.rpm 5.1 MB/s | 405 kB 00:00
(8/9): tree-1.7.0-15.el8.x86_64.rpm 2.6 MB/s | 59 kB 00:00
(9/9): python3-policycoreutils-2.9-12.el8.noarch.rpm 17 MB/s | 2.2 MB 00:00
----------------------------------------------------------------------------------------
Total 1.3 MB/s | 4.8 MB 00:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-setools-4.3.0-2.el8.x86_64 1/9
Installing : python3-libsemanage-2.9-6.el8.x86_64 2/9
Installing : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 3/9
Installing : checkpolicy-2.9-1.el8.x86_64 4/9
Installing : python3-policycoreutils-2.9-12.el8.noarch 5/9
Installing : policycoreutils-python-utils-2.9-12.el8.noarch 6/9
Installing : tree-1.7.0-15.el8.x86_64 7/9
Installing : rsync-3.1.3-12.el8.x86_64 8/9
Installing : wget-1.19.5-10.el8.x86_64 9/9
Running scriptlet: wget-1.19.5-10.el8.x86_64 9/9
Verifying : wget-1.19.5-10.el8.x86_64 1/9
Verifying : checkpolicy-2.9-1.el8.x86_64 2/9
Verifying : policycoreutils-python-utils-2.9-12.el8.noarch 3/9
Verifying : python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64 4/9
Verifying : python3-libsemanage-2.9-6.el8.x86_64 5/9
Verifying : python3-policycoreutils-2.9-12.el8.noarch 6/9
Verifying : python3-setools-4.3.0-2.el8.x86_64 7/9
Verifying : rsync-3.1.3-12.el8.x86_64 8/9
Verifying : tree-1.7.0-15.el8.x86_64 9/9
Installed:
checkpolicy-2.9-1.el8.x86_64
policycoreutils-python-utils-2.9-12.el8.noarch
python3-audit-3.0-0.17.20191104git1c2f876.el8.x86_64
python3-libsemanage-2.9-6.el8.x86_64
python3-policycoreutils-2.9-12.el8.noarch
python3-setools-4.3.0-2.el8.x86_64
rsync-3.1.3-12.el8.x86_64
tree-1.7.0-15.el8.x86_64
wget-1.19.5-10.el8.x86_64
Complete!
Step 2 : Membuat direktori Repository
Sebagai catatan bahwa pada server ini menggunakan dua hardisk. Hardisk pertama berkapasitas 60 GB digunakan sebagai system operasi CentOS 8, sedangkan hardisk kedua memilki kapasitas 1 TB yang digunakan untuk data penyimpanan repository. Pada saat instalasi CentOS 8 hardisk yang seting adalah hardisk yang berkapasitas 60 GB, sedang hardisk yang 1 TB ditambahkan pada saat proses instal CentOS 8 telah selesai. Petunjuk atau tutorial penambahan hardisk yang kedua dapat dilihat pada link “Menambah Hardisk baru di Server CentOS”
[root@localhost ~]# mkdir -p /hdd1/repos/centos/8/ [root@localhost ~]# tree /hdd1/ /hdd1/ ├── lost+found └── repos └── centos └── 8 4 directories, 0 files
Step 3 : Membuat script Sync Repository
[root@localhost ~]# nano /etc/centos8_reposync.sh
#!/bin/bash
repos_base_dir="/hdd1/repos/centos/8/"
# Start sync if base repo directory exist
if [[ -d "$repos_base_dir" ]] ; then
# Start Sync
rsync -avSHP --delete rsync://mirror.liquidtelecom.com/centos/8/ "$repos_base_dir"
# Download CentOS 8 repository key
wget -P $repos_base_dir wget https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
fi
Lakukan perintah chmod agar script rsync dapat dieksekusi atau dijalankan
[root@localhost ~]# chmod +x /etc/centos8_reposync.sh
[root@localhost ~]# /etc/centos8_reposync.sh
Tampilan saat script di jalankan.
AppStream/aarch64/kickstart/Packages/fence-agents-intelmodular-4.2.1-53.el8.noarch.rpm 22,988 100% 59.39kB/s 0:00:00 (xfr#497, ir-chk=8701/9224) AppStream/aarch64/kickstart/Packages/fence-agents-ipdu-4.2.1-53.el8.noarch.rpm 23,204 100% 59.95kB/s 0:00:00 (xfr#498, ir-chk=8700/9224) AppStream/aarch64/kickstart/Packages/fence-agents-ipmilan-4.2.1-53.el8.noarch.rpm 33,492 100% 86.30kB/s 0:00:00 (xfr#499, ir-chk=8699/9224) AppStream/aarch64/kickstart/Packages/fence-agents-kdump-4.2.1-53.el8.aarch64.rpm 35,320 100% 90.77kB/s 0:00:00 (xfr#500, ir-chk=8698/9224) AppStream/aarch64/kickstart/Packages/fence-agents-mpath-4.2.1-53.el8.noarch.rpm 25,280 100% 64.80kB/s 0:00:00 (xfr#501, ir-chk=8697/9224) AppStream/aarch64/kickstart/Packages/fence-agents-redfish-4.2.1-53.el8.aarch64.rpm 23,216 100% 59.51kB/s 0:00:00 (xfr#502, ir-chk=8696/9224) AppStream/aarch64/kickstart/Packages/fence-agents-rhevm-4.2.1-53.el8.noarch.rpm 23,796 100% 60.83kB/s 0:00:00 (xfr#503, ir-chk=8695/9224) AppStream/aarch64/kickstart/Packages/fence-agents-rsa-4.2.1-53.el8.noarch.rpm 22,400 100% 57.11kB/s 0:00:00 (xfr#504, ir-chk=8694/9224) AppStream/aarch64/kickstart/Packages/fence-agents-rsb-4.2.1-53.el8.noarch.rpm 22,436 100% 57.21kB/s 0:00:00 (xfr#505, ir-chk=8693/9224) AppStream/aarch64/kickstart/Packages/fence-agents-sbd-4.2.1-53.el8.noarch.rpm 24,292 100% 61.78kB/s 0:00:00 (xfr#506, ir-chk=8692/9224) AppStream/aarch64/kickstart/Packages/fence-agents-scsi-4.2.1-53.e
Dan proses ini akan memakan waktu yang cukup lama tergantung dari kecepatan bandwitdh internet yang kita miliki
Sejumlah direktori hasil mirror dari server pusat akan muncul pada direktori repository kita.
[root@localhost ~]# ls -1 /hdd1/repos/centos/8/ AppStream BaseOS centosplus cloud COMPOSE_ID configmanagement cr Devel extras fasttrack HighAvailability infra isos messaging nfv opstools PowerTools storage virt
Tunggu hingga script selesai dijalankan, lalu kita buat cron job untuk sinkronisasi otomatis.
Kita seting cron job berjalan setiap hari minggu pada pukul 03:00:00 Wib dinihari.
[root@localhost ~]# crontab -e
00 3 * * 7 /etc/centos8_reposync.sh
Step 4 : konfigurasi Nginx
Lakukan perubahan pada file nginx.conf seperti berikut ini
[root@localhost repos]# nano /etc/nginx/nginx.conf server { listen 80 default_server; listen [::]:80 default_server; server_name _; #root /usr/share/nginx/html; root /hdd1/repos; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { autoindex on; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { }
Konfigurasi SELinux
[root@localhost ~]# semanage fcontext -a -t httpd_sys_content_t "/hdd1/repos(/.*)?" [root@localhost ~]# restorecon -Rv /hdd1/repos Relabeled /hdd1/repos/centos/8/AppStream/aarch64/kickstart/repodata/repomd.xml.asc from unconfined_u:object_r:unlabeled_t:s0 to unconfined_u:object_r:httpd_sys_content_t:s0 Relabeled /hdd1/repos/centos/8/AppStream/aarch64/kickstart/Packages from unconfined_u:object_r:unlabeled_t:s0 to unconfined_u:object_r:httpd_sys_content_t:s0 Relabeled /hdd1/repos/centos/8/opstools from unconfined_u:object_r:unlabeled_t:s0 to unconfined_u:object_r:httpd_sys_content_t:s0 Relabeled /hdd1/repos/centos/8/infra from unconfined_u:object_r:unlabeled_t:s0 to unconfined_u:object_r:httpd_sys_content_t:s0
Restart nginx
[root@localhost ~]# nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful [root@localhost ~]# systemctl restart nginx
Buka browser dan silahkan akses alamat server mirror CentOS 8
Step 5 : Konfigurasi klien (CentOS 8 client)
Sekarang Server mirror kita sudah siap, kita dapat mengkonfigurasi mesin CentOS 8 kita menggunakan repositori lokal.
Login sebagai root pada mesin CentOS 8 client.
Lakukan backup terlebih dahulu terhadap file-file repositori yang ada.
[root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# mkdir repos-bkp [root@localhost yum.repos.d]# ls CentOS-Linux-AppStream.repo CentOS-Linux-HighAvailability.repo CentOS-Linux-BaseOS.repo CentOS-Linux-Media.repo CentOS-Linux-ContinuousRelease.repo CentOS-Linux-Plus.repo CentOS-Linux-Debuginfo.repo CentOS-Linux-PowerTools.repo CentOS-Linux-Devel.repo CentOS-Linux-Sources.repo CentOS-Linux-Extras.repo repos-bkp CentOS-Linux-FastTrack.repo [root@localhost yum.repos.d]# mv *.repo repos-bkp/
Copy-paste script berikut ini ke file “lokal.repo”
[root@localhost yum.repos.d]# nano lokal.repo
[BaseOS]
name=CentOS-$releasever - Base
baseurl=http://10.10.129.12/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
[AppStream]
name=CentOS-$releasever - AppStream
baseurl=http://10.10.129.12/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://10.10.129.12/centos/$releasever/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
[extras]
name=CentOS-$releasever - Extras
baseurl=http://10.10.129.12/centos/$releasever/extras/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
[PowerTools]
name=CentOS-$releasever - PowerTools
baseurl=http://10.10.129.12/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
[cr]
name=CentOS-$releasever - cr
baseurl=http://10.10.129.12/centos/$releasever/cr/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
[fasttrack]
name=CentOS-$releasever - fasttrack
baseurl=http://10.10.129.12/centos/$releasever/fasttrack/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=http://10.10.129.12/centos/$releasever/RPM-GPG-KEY-CentOS-Official
Bersihkan cache repository yg telah ada sebelumnya
[root@localhost yum.repos.d]# yum clean all
21 files removed
Update cache repository
[root@localhost yum.repos.d]# yum makecache
CentOS-8 - Base 455 kB/s | 2.3 MB 00:05
CentOS-8 - AppStream 770 kB/s | 6.3 MB 00:08
CentOS-8 - Extras 2.1 kB/s | 8.6 kB 00:04
Metadata cache created.
Daftar list repository
[root@localhost yum.repos.d]# yum repolist
repo id repo name
AppStream CentOS-8 - AppStream
BaseOS CentOS-8 - Base
extras CentOS-8 - Extras
Mencoba update paket-paket menggunakan server mirror repository lokal
[root@localhost yum.repos.d]# yum update
Last metadata expiration check: 0:02:37 ago on Sun 14 Feb 2021 12:13:09 AM WIB.
Dependencies resolved.
==========================================================================================================================
Package Architecture Version Repository Size
==========================================================================================================================
Installing:
kernel x86_64 4.18.0-240.10.1.el8_3 BaseOS 4.3 M
kernel-core x86_64 4.18.0-240.10.1.el8_3 BaseOS 30 M
kernel-modules x86_64 4.18.0-240.10.1.el8_3 BaseOS 26 M
Upgrading:
NetworkManager x86_64 1:1.26.0-12.el8_3 BaseOS 2.4 M
NetworkManager-libnm x86_64 1:1.26.0-12.el8_3 BaseOS 1.8 M
NetworkManager-team x86_64 1:1.26.0-12.el8_3 BaseOS 142 k
NetworkManager-tui x86_64 1:1.26.0-12.el8_3 BaseOS 320 k
curl x86_64 7.61.1-14.el8_3.1 BaseOS 353 k
freetype x86_64 2.9.1-4.el8_3.1 BaseOS 394 k
gnutls x86_64 3.6.14-7.el8_3 BaseOS 1.0 M
iptables x86_64 1.8.4-15.el8_3.3 BaseOS 584 k
iptables-ebtables x86_64 1.8.4-15.el8_3.3 BaseOS 71 k
iptables-libs x86_64 1.8.4-15.el8_3.3 BaseOS 106 k
iwl100-firmware noarch 39.31.5.1-101.el8_3.1 BaseOS 169 k
iwl1000-firmware noarch 1:39.31.5.1-101.el8_3.1 BaseOS 232 k
iwl105-firmware noarch 18.168.6.1-101.el8_3.1 BaseOS 253 k
iwl135-firmware noarch 18.168.6.1-101.el8_3.1 BaseOS 262 k
iwl2000-firmware noarch 18.168.6.1-101.el8_3.1 BaseOS 256 k
iwl2030-firmware noarch 18.168.6.1-101.el8_3.1 BaseOS 265 k
iwl3160-firmware noarch 1:25.30.13.0-101.el8_3.1 BaseOS 1.7 M
iwl5000-firmware noarch 8.83.5.1_1-101.el8_3.1 BaseOS 313 k
iwl5150-firmware noarch 8.24.2.2-101.el8_3.1 BaseOS 166 k
iwl6000-firmware noarch 9.221.4.1-101.el8_3.1 BaseOS 186 k
iwl6000g2a-firmware noarch 18.168.6.1-101.el8_3.1 BaseOS 329 k
iwl6050-firmware noarch 41.28.5.1-101.el8_3.1 BaseOS 262 k
iwl7260-firmware noarch 1:25.30.13.0-101.el8_3.1 BaseOS 15 M
kernel-tools x86_64 4.18.0-240.10.1.el8_3 BaseOS 4.5 M
kernel-tools-libs x86_64 4.18.0-240.10.1.el8_3 BaseOS 4.3 M
kexec-tools x86_64 2.0.20-34.el8_3.1 BaseOS 496 k
libcurl x86_64 7.61.1-14.el8_3.1 BaseOS 299 k
libselinux x86_64 2.9-4.el8_3 BaseOS 165 k
libselinux-utils x86_64 2.9-4.el8_3 BaseOS 242 k
linux-firmware noarch 20200619-101.git3890db36.el8_3 BaseOS 101 M
microcode_ctl x86_64 4:20200609-2.20201112.1.el8_3 BaseOS 4.6 M
openssl x86_64 1:1.1.1g-12.el8_3 BaseOS 707 k
openssl-libs x86_64 1:1.1.1g-12.el8_3 BaseOS 1.5 M
python3-libselinux x86_64 2.9-4.el8_3 BaseOS 283 k
python3-perf x86_64 4.18.0-240.10.1.el8_3 BaseOS 4.4 M
selinux-policy noarch 3.14.3-54.el8_3.2 BaseOS 622 k
selinux-policy-targeted noarch 3.14.3-54.el8_3.2 BaseOS 15 M
sudo x86_64 1.8.29-6.el8_3.1 BaseOS 924 k
systemd x86_64 239-41.el8_3.1 BaseOS 3.5 M
systemd-libs x86_64 239-41.el8_3.1 BaseOS 1.1 M
systemd-pam x86_64 239-41.el8_3.1 BaseOS 456 k
systemd-udev x86_64 239-41.el8_3.1 BaseOS 1.3 M
tuned noarch 2.14.0-3.el8_3.1 BaseOS 292 k
tzdata noarch 2021a-1.el8 BaseOS 473 k
Transaction Summary
==========================================================================================================================
Install 3 Packages
Upgrade 44 Packages
Total download size: 233 M
Is this ok [y/N]:y
Downloading Packages:
(1/47): kernel-4.18.0-240.10.1.el8_3.x86_64.rpm 557 kB/s | 4.3 MB 00:07
(2/47): NetworkManager-1.26.0-12.el8_3.x86_64.rpm 740 kB/s | 2.4 MB 00:03
(3/47): NetworkManager-libnm-1.26.0-12.el8_3.x86_64.rpm 868 kB/s | 1.8 MB 00:02
(4/47): NetworkManager-team-1.26.0-12.el8_3.x86_64.rpm 729 kB/s | 142 kB 00:00
(5/47): NetworkManager-tui-1.26.0-12.el8_3.x86_64.rpm 733 kB/s | 320 kB 00:00
(6/47): curl-7.61.1-14.el8_3.1.x86_64.rpm 891 kB/s | 353 kB 00:00
(7/47): freetype-2.9.1-4.el8_3.1.x86_64.rpm 677 kB/s | 394 kB 00:00
(8/47): gnutls-3.6.14-7.el8_3.x86_64.rpm 894 kB/s | 1.0 MB 00:01
(9/47): iptables-1.8.4-15.el8_3.3.x86_64.rpm 892 kB/s | 584 kB 00:00
(45/47): tzdata-2021a-1.el8.noarch.rpm 1.5 MB/s | 473 kB 00:00
(46/47): selinux-policy-targeted-3.14.3-54.el8_3.2.noarch.rpm 1.3 MB/s | 15 MB 00:11
(47/47): linux-firmware-20200619-101.git3890db36.el8_3.noarch.rpm 2.7 MB/s | 101 MB 00:37
--------------------------------------------------------------------------------------------------------------------------
Total 3.1 MB/s | 233 MB 01:14
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: libselinux-2.9-4.el8_3.x86_64 1/1
Upgrading : libselinux-2.9-4.el8_3.x86_64 1/91
Running scriptlet: libselinux-2.9-4.el8_3.x86_64 1/91
Upgrading : systemd-libs-239-41.el8_3.1.x86_64 2/91
Running scriptlet: systemd-libs-239-41.el8_3.1.x86_64 2/91
Upgrading : gnutls-3.6.14-7.el8_3.x86_64 3/91
Upgrading : openssl-libs-1:1.1.1g-12.el8_3.x86_64 4/91
Secara default beberapa repository di non-aktifkan (Disable) oleh CentOS, untuk mengaktifkannya kita instal terlebih dahulu paket “yum-utils”
[root@localhost yum.repos.d]# yum install yum-utils
Last metadata expiration check: 0:20:18 ago on Sun 14 Feb 2021 12:13:09 AM WIB.
Dependencies resolved.
==========================================================================================================================
Package Architecture Version Repository Size
==========================================================================================================================
Installing:
yum-utils noarch 4.0.17-5.el8 BaseOS 68 k
Transaction Summary
==========================================================================================================================
Install 1 Package
Total download size: 68 k
Installed size: 20 k
Is this ok [y/N]: y
Downloading Packages:
yum-utils-4.0.17-5.el8.noarch.rpm 33 kB/s | 68 kB 00:02
--------------------------------------------------------------------------------------------------------------------------
Total 32 kB/s | 68 kB 00:02
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : yum-utils-4.0.17-5.el8.noarch 1/1
Running scriptlet: yum-utils-4.0.17-5.el8.noarch 1/1
Verifying : yum-utils-4.0.17-5.el8.noarch 1/1
Installed:
yum-utils-4.0.17-5.el8.noarch
Complete!
Mengaktifkan repository Powertools dan centosplus
[root@localhost yum.repos.d]# yum-config-manager --enable PowerTools [root@localhost yum.repos.d]# yum-config-manager --enable centosplus
Hasilnya
[root@localhost yum.repos.d]# yum repolist repo id repo name AppStream CentOS-8 - AppStream BaseOS CentOS-8 - Base PowerTools CentOS-8 - PowerTools centosplus CentOS-8 - Plus extras CentOS-8 - Extras
Selesai
Semoga bermanfaat …