Add etc repo file into repository directory RHEL

Add etc repo file into repository directory RHEL

RHEL enables the user to download the required software packages from a FTP Server, as similar in Windows Operating System we download .exe file and install the software in RHEL Linux we have .rpm files. These software or packaging file are present either present in Open Source FTP servers or Private Server and dependent on some of the other packages.




Understanding the /etc/yum.repos.d

/etc/yum.repos.d is the directory where we have list of .repo file extensions.  .repo file consists of repo name, name, baseurl, gpgkey and enabled attributes

repo name - short user defined repo name enclosed with square braces [RHEL8] user defined
name - user defined name to describe the repository
baseurl - URL of repository ftp/http/file
            Open Source Repository - ftp://fully_qualified.domain.name.com/repo/directory
            Authentication Based Repository - ftp://user%40company_domain.com:password@fully_qualified.domain.name.com/repo/directory
gpgkey - location of GPG key path,
enabled - Set to 1 or 0 to enable or disable the repo usage

Sample of /etc/yum.repos.d

[root@server yum.repos.d]# cat rhel8.repo
[RHEL8]
name=RHEL8 yum repository
baseurl=

ftp://user%40company_domain.com:password@fully_qualified.domain.name.com/repo/directory
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
enabled=1

Clean the existing yum and refresh

Cleaning up of existing cache and refreshing is important task after adding the new repository in to the Linux software manager 

[root@server yum.repos.d]# yum clean all
23 files removed

Refreshes and lists all the repository configured in RHEL Machine
[root@server yum.repos.d]# yum repolist all

Similar task of clean up and refresh can also be done using "rm -rf /var/cache/dnf" and "dnf upgrade". After adding the repository we can search the software for example to search vnc software 

Search and Display dependencies 
 
[root@server yum.repos.d]# yum search vnc
Last metadata expiration check: 0:03:25 ago on Sun 16 Aug 2020 09:48:57 AM CDT.
=======================================================================
Name & Summary Matched: vnc 
=======================================================================
tigervnc-server.x86_64 : A TigerVNC server
gvnc.x86_64 : A GObject for VNC connections
gvnc.i686 : A GObject for VNC connections
gtk-vnc2.x86_64 : A GTK3 widget for VNC clients
gtk-vnc2.i686 : A GTK3 widget for VNC clients
tigervnc-icons.noarch : Icons for TigerVNC viewer
tigervnc.x86_64 : A TigerVNC remote display system
tigervnc-license.noarch : License of TigerVNC suite
tigervnc-server-module.x86_64 : TigerVNC module to Xorg
libvncserver.x86_64 : Library to make writing a VNC server easy
libvncserver.i686 : Library to make writing a VNC server easy
tigervnc-server-minimal.x86_64 : A minimal installation of TigerVNC server
tigervnc-server-applet.noarch : Java TigerVNC viewer applet for TigerVNC server
========================================================================== 
Summary Matched: vnc 
===========================================================================
vinagre.x86_64 : VNC client for GNOME
[root@server yum.repos.d]#

yum will search all the software packages and their dependencies that are present in the repository file and lists them. 

 
 


Post a Comment

0 Comments