How To Add Repolist In Yum Unbuntu
This article volition testify you lot how to add repositories in YUM (Yellodog Updater Modified), the default package manager for Red Hat based Linux distributions. We will as well discuss what the repositories are and why we need to set them upward.
Dependencies amid packages
Software packages in Linux often depend upon other packages to run correctly. For example, the gzip packet, a pinch/decompression utility, requires at least a beat (like 'sh' or 'bash') and the libc library to be installed. There are many gnome utilities, like gnome-concluding, gnome-system-monitor, gnome-panel and others that need gnome (the default graphical environment in many Linux, including RHEL).
Dependency problem
So how does it affect anything? In the example higher up, gnome-last package will not be installed until all of its dependencies are installed (or resolved). These dependencies may accept their own dependencies which may in plough take some more than dependencies, and and so on following a hierarchy of dependencies. Resolving these dependencies manually will take a lot of fourth dimension and attempt.
YUM
So where does YUM fit into the big picture? YUM resolves these dependencies for yous, so the installation of new packages is fast and easy.
The Software repositories
The repositories are a big collection or pool of software packages. YUM needs repositories to resolve dependencies and install packages. Many repositories are bachelor on the net. You may accept your own repositories on your network. The repository data is contained in the xml files. These files are contained in a directory named 'repodata'. You don't need to bother about them every bit long as y'all are concerned with configuring YUM for these repositories. Updating these repository files is the task of the ambassador. YUM uses these files for caching the repository data.
For the purpose of this article, RHEL-5.6-server is used.
YUM Configuration
The YUM configuration files are located in "/etc/yum.repos.d/" directory. The current files in the repository are:
[root@redhat-server ~]# ls -50 /etc/yum.repos.d/ total 16 -rw-r--r-- ane root root 561 Dec fourteen 2010 rhel-debuginfo.repo -rw-r--r-- 1 root root 222 Dec fourteen 2010 rhel-source.repo
The repository configuration files must end with '.repo' every bit with the above two files. Let u.s.a. check the layout of one of these files:
[root@redhat-server ~]# cat /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Lid Enterprise Linux $releasever - Source baseurl=ftp://ftp.redhat.com/redhat/linux/enterprise/$releasever/en/os/SRPMS/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-Central-redhat-release
• [repositoryid] : The showtime line, in square brackets is the unique ID for a repository. It must exist different for each repository, and be of i word only.
• name: This is the description of the repository.
• baseurl: This is the location url to the repository. This is the path to 'repodata' directory. The repository tin can be an 'ftp' or 'http' repository. Information technology tin can also be located on the automobile itself (local repository).
• enabled: 'one' value enables and '0' disables the repository.
• gpgcheck: Whether or not should yum check the gpg signature of the packages.
• gpgkey: Url to the gpg key file for repository. This option has no meaning if the above value of gpgcheck is '0' or if that entry is missing.
Adding your own repository
To add a yum repository, let us create a file named 'rhel-local.repo'. My repository is located in "/dump" directory locally.
[root@redhat-server ~]# true cat > /etc/yum.repos.d/rhel-local.repo
[rhel-ftp]
name=Local repository baseurl=file:///dump enabled=1 gpgcheck=0 [root@redhat-server ~]#
Here, we don't want to cheque the signature, so gpgcheck is '0'. If your repository is located at ftp or http or any other server, you lot just need to alter the base url accordingly.
Now, to be sure that this repository is set up properly, you tin run 'yum listing' command which will listing installed as well as available packages from the repository. The output of this command is very huge, so in the following command, results are filtered using 'grep' and 'head':
[root@redhat-server ~]# yum list | grep rhel-ftp | head This arrangement is not registered with RHN. RHN support will be disabled. Deployment_Guide-as-IN.noarch v.2-11 rhel-ftp Deployment_Guide-bn-IN.noarch 5.two-11 rhel-ftp Deployment_Guide-de-DE.noarch 5.2-11 rhel-ftp Deployment_Guide-es-ES.noarch v.2-xi rhel-ftp Deployment_Guide-fr-FR.noarch 5.2-xi rhel-ftp Deployment_Guide-gu-IN.noarch 5.2-eleven rhel-ftp Deployment_Guide-hi-IN.noarch five.2-xi rhel-ftp Deployment_Guide-information technology-It.noarch 5.2-11 rhel-ftp Deployment_Guide-ja-JP.noarch 5.2-11 rhel-ftp Deployment_Guide-kn-IN.noarch 5.2-11 rhel-ftp
Adding more repositories to Yum
Make your Yum more robust by calculation more repositories like DAG, UPDATE and RPMforge. For calculation extra repositories to yum perform the steps beneath:
#cd /etc/yum.repos.d
#half-dozen dag.repo // the add the following lines in that file//
[dag]
name=Dag RPM Repository for Scarlet Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=ane rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Afterwards this, salvage the file and run the post-obit command:
# yum check-update
Working with repositories in CentOS 7
You can discover some of the nearly useful repositories on the list provided on the Available Repositories for CentOS webpage, with instructions on how to install them. For some of the repositories you lot will take to follow the instructions above and for others yous volition accept to install a parcel similar below:
For example, to install the most popular 3rd-party repository, the EPEL (Actress Packages for Enterprise Linux), yous can only run the following command:
# yum install epel-release

And then the packages in the EPEL will exist available on your system.
Proceed in mind that you can e'er run across a list of repositories used by your organisation by running the post-obit command:
# yum repolist

Also, if you wish to search for a package in a particular repository you can use the post-obit command:
# yum --disablerepo="*" --enablerepo="epel" search znc

How To Add Repolist In Yum Unbuntu,
Source: https://linoxide.com/add-repositories-yum/
Posted by: hazeltonopurnisting.blogspot.com
0 Response to "How To Add Repolist In Yum Unbuntu"
Post a Comment