Toggle navigation

Penggunaan Repositori Centos

Version 1.0.0

Respository sistem operasi centos yang kami miliki kini telah terdaftar pada website resmi mirror centos https://www.centos.org/download/mirrors/. Dengan terdaftarnya mirror.telkomuniversity.ac.id pada website resmi centos. maka, saat melakukan update, sistem operasi centos akan mengenali server mirror dari Telkom University.

Namun, jika sistem operasi centos hanya ingin diarahkan ke mirror Telkom University. Maka, perlu adanya perubahan konfigurasi pada yum.repos.d.

 

Sebelum melakukan update repositori sebaiknya anda melakukan pemeriksaan versi dari sistem operasi centos dengan cara :

sudo cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)

File yang perlu dirubah isinya adalah file CentOS-Base.repo. Untuk merubah konfigurasi file yang telah ada baiknya membuat salinan file kemudian di ganti dengan script yang telah kami sediakan.

Membuat salinan file

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_ASLI

Mengapus isi file

sudo cat /dev/null > /etc/yum.repos.d/CentOS-Base.repo

Membuat file repo

sudo echo '# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.telkomuniversity.ac.id/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://mirror.telkomuniversity.ac.id/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://mirror.telkomuniversity.ac.id/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.telkomuniversity.ac.id/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7' > /etc/yum.repos.d/CentOS-Base.repo

Setelah konfigurasi file, langkah selanjutnya adalah memeriksa apakah repository dapat digunakan dengan cara :

Periksa list repo

sudo yum repolist all

Pastikan repo dibawah ini status enable

...
base/7/x86_64             CentOS-7 - Base             enabled: 10,097
base-debuginfo/x86_64     CentOS-7 - Debuginfo        disabled
base-source/7             CentOS-7 - Base Sources     disabled
c7-media                  CentOS-7 - Media            disabled
...
extras/7/x86_64           CentOS-7 - Extras           enabled: 10,097
extras-source/7           CentOS-7 - Extras Sources   disabled
fasttrack/7/x86_64        CentOS-7 - fasttrack        disabled
updates/7/x86_64          CentOS-7 - Updates          enabled: 10,097
updates-source/7          CentOS-7 - Updates Sources  disabled
repolist: 30,291
[root@localhost ~]#