Rabu, 19 September 2018

Repolocal redhat DVD

Repository Lokal DVD Redhat


Rate This

linux-training1.bmp
Pada postingan kali ini kita akan membahas mengenai konfigurasi Repository lokal yang akan kita arahkan ke DVD Instalasi kita.
Satu kelemahan redhat yaitu Jika kita tidak memiliki serial number alias Subscriber number, maka kita tidak akan bisa install/update aplikasi ke internet. Untuk mencegah hal tersebut kita perlu mengkonfigurasi repository kita ke DVD lokal yang kita miliki.
1) Install Redhat server ke dalam server kita. Klik Disini untuk melihat cara install Redhat Server.
2) Setelah selesai instalasi Login lah sebagai root dan password yang kita masukkan saat instalasi
3) Setelah login akan masuk pada tampilan berikut
install redhat server, install rhel server, install, redhat, server, login, redhat, server, root, login redhat,server
install redhat server, install rhel server, install, redhat, server, login, redhat, server, root, login redhat,server
4) Kemudian Masukkan DVD Installer Redhat Server kita
5) Lakukan Mounting DVD tadi ke sistem
# mkdir /media/dvd# mount /dev/cdrom /media/dvd
6) Setelah mounting lakukan editing file repository
# cd /etc/yum.repos.d/
# rm -rf rhel-source.repo
7) Lalu buat file baru dan disi sebagai berikut, perlu diingat bahwa extensi akhir file harus .repo
# vi repo-lokal.repo
install redhat server, install rhel server, install, redhat, server, login, redhat, server, root, login redhat,server
install redhat server, install rhel server, install, redhat, server, login, redhat, server, root, login redhat,server
8) Setelah itu di save dan lakukan update
# yum repolist all
install redhat server, install rhel server, install, redhat, server, login, redhat, server, root, login redhat,server
install redhat server, install rhel server, install, redhat, server, login, redhat, server, root, login redhat,server
9) Jika sudah muncul seperti diatas maka repository pun sudah diarahkan ke DVD lokal anda. Jika sewaktu saat anda ingin melakukan instalasi aplikasi, anda tinggal ikuti langkah berikut:
– Masukkan DVD installler
– Ketikkan perintah berikut
# mount /dev/cdrom /media/dvd
Sekian Tutorial Dari Saya semoga bermanfaat untuk para pembaca sekalian.

Need to set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 7

 SOLUTION VERIFIED - Updated  - 

Environment

Red Hat Enterprise Linux 7

Issue

  • How to set up yum repository to use locally-mounted DVD with Red Hat Enterprise Linux (RHEL) 7
  • Would like to upgrade server from RHEL 7.x to RHEL 7.y
  • Have a secure environment that will never be connected to the internet, but still needs to be updated
  • Way to update the packages on server, with no satellite server and servers disconnected from internet
  • Offline patches for Red Hat systems
  • How do I create a local repository in RHEL 7?

Resolution

Please note: If the system is registered to Red Hat Network, yum can be run with the --noplugins option to prevent it from connecting to RHN. The safer option would be to unregister the system to avoid updating to the latest release.
  1. Mount the RHEL 7 installation ISO to a directory like /mnt, e.g.:
    # mount -o loop RHEL7.1.iso /mnt
    
    If you use DVD media , you can mount like below.
    # mount /dev/sr0  /mnt
    
  2. Copy the media.repo file from the root of the mounted directory to /etc/yum.repos.d/ and set the permissions to something sane, e.g.:
    # cp /mnt/media.repo /etc/yum.repos.d/rhel7dvd.repo
    # chmod 644 /etc/yum.repos.d/rhel7dvd.repo
    
  3. Edit the new repo file, changing the gpgcheck=0 setting to 1 and adding the following 3 lines
    enabled=1
    baseurl=file:///mnt/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
    In the end, the new repo file could look like the following (though the mediaid will be different depending on the version of RHEL):
    [InstallMedia]
    name=DVD for Red Hat Enterprise Linux 7.1 Server
    mediaid=1359576196.686790
    metadata_expire=-1
    gpgcheck=1
    cost=500
    enabled=1
    baseurl=file:///mnt/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
  4. clear the related caches by yum clean all and subscription-manager clean once
    # yum clean all
    # subscription-manager clean
    
  5. check whether you can get the packages list from the DVD repo
    # yum  --noplugins list
    
  6. if no problem , you will update
    # yum  --noplugins update

Tidak ada komentar:

Posting Komentar