
Semua pasti sudah tau kalo Centos 7 saat ini sudah EOL (End Of Life)
so, gimana dong kita sudah ga dapat update security lagi?
Yes benar banget, memang Centos 7 saat ini sudah tidak lagi memberikan update-update security terbaru. Namum ada beberapa vendor lain yang masih memberikan update tetapi berbayar. Nah, tinggal kamu pilih saja, apakah kamu mau update ke versi atasnya atau malah pake yg berbayar saja?
Sebenarnya kelanjutan dari Centos 7 ini adalah Centos 8, tetapi karena dia menggunakan konsep stream, maka banyak user yang beralih ke turunan lainnya yaitu seperti Rocky Linux atau Almalinux. Dalam hal ini kita sih lebih condong ke Almalinux 8 atau 9 saja ya.
Solusi Gratis kelanjutan Repo Centos7
- Buat folder Backup repo
mkdir/etc/yum.repos.d/old - Pindahkan semua repo CentOs dan Epel repo ke direktori old
mv /etc/yum.repos.d/CentOS*.repo /etc/yum.repos.d/old/mv /etc/yum.repos.d/epel*.repo /etc/yum.repos.d/old/ - Buat file repo baru CentOS.repo
vim /etc/yum.repos.d/CentOS.repo - masukan baris berikut
[base]name=CentOS-7.9.2009 - Basebaseurl=http://vault.centos.org/7.9.2009/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7enabled=1metadata_expire=never#released updates[updates]name=CentOS-7.9.2009 - Updatesbaseurl=http://vault.centos.org/7.9.2009/updates/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7enabled=1metadata_expire=never# additional packages that may be useful[extras]name=CentOS-7.9.2009 - Extrasbaseurl=http://vault.centos.org/7.9.2009/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7enabled=1metadata_expire=never# additional packages that extend functionality of existing packages[centosplus]name=CentOS-7.9.2009 - CentOSPlusbaseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7enabled=0metadata_expire=never#fasttrack - packages by Centos Users[fasttrack]name=CentOS-7.9.2009 - Contribbaseurl=http://vault.centos.org/7.9.2009/fasttrack/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7enabled=0metadata_expire=never - Buat baru file repo epel.repo
vim /etc/yum.repos.d/epel.repo - masukan baris berikut
[epel]name=Extra PackagesforEnterprise Linux 7 -$basearchbaseurl=https://archives.fedoraproject.org/pub/archive/epel/7/$basearchenabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7metadata_expire=never[epel-debuginfo]name=Extra PackagesforEnterprise Linux 7 -$basearch- Debugbaseurl=https://archives.fedoraproject.org/pub/archive/epel/7/$basearch/debugenabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7gpgcheck=1metadata_expire=never[epel-source]name=Extra PackagesforEnterprise Linux 7 -$basearch- Sourcebaseurl=https://archives.fedoraproject.org/pub/archive/epel/7/SRPMSenabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7gpgcheck=1metadata_expire=never - Hapus metadata existing
yum clean all - Memuat list paket yang tersedia
yum check-update
Jika sudah sukses update, coba reboot server kamu , agar kernel terbaru bisa digunakan.
Jika mencoba yum update dan didapat error seperti berikut ini
[root@xxx ~]# yum updateLoaded plugins: fastestmirrorRepository base is listed more than once in the configurationRepository updates is listed more than once in the configurationRepository extras is listed more than once in the configurationRepository centosplus is listed more than once in the configurationRepository fasttrack is listed more than once in the configurationLoading mirror speeds from cached hostfileCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
One of the configured repositories failed (Unknown),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).
3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
maka kamu harus disable repo existing dengan cara :
yum --disablerepo=CentOS-Base.repo
ATAU memindahkan repo yang bermasalah ke folder lain.mv /etc/yum.repos.d/CentOS-Base.repo CentOS-Base.repo
referensi : https://saad.web.id/2024/07/url-repo-centos-7-setelah-eol-30-juni-2024/
Solusi Repo Centos7 Berbayar
Coba kamu kunjungi website ini : https://tuxcare.com/extended-lifecycle-support/centos-7-extended-support/
Untuk satu server Centos7, kamu harus membayar USD 4.5

Kesimpulan
Kalo mau lebih aman, sebaiknya kamu jadwalkan untuk mengganti OS dari Centos 7 ke Almalinux 8.
Kalo kamu masih malas repot, bisa gunakan Repo berbayar dari tuxcare.
Kalo kamu ga mau bayar, mungkin bisa pake Repo dari vault, tetapi karena ini gratis maka sifatnya bukan selalu mendapatkan security update, tetapi hanya menyimpan posisi Repo terakhir saja tanpa adanya update tambahan setelah tanggal 30 Juni 2024.
Yuk pilih yang terbaik untuk server mu!



