Every working machine have to have a few or the other manner to install a software. What's critical is the fact that the user ought to no longer accept the duty of dealing with the overhead concerned within the installation of this system.

You could ask,what is the overhead involved in installing a software?

Yes there are numerous overheads worried in installing a software in a pc Like the subsequent.

Is this system compatible with my laptop architecture.
Is that software like minded with my operating device model.
Does all of the programs and libraries required to run a positive program there within the gadget
Will the newly mounted application war with an already installed program


An installer or program supervisor, should manage those overhead by using itself by way of now not harassing the user. Linux, through nature is the pleasant working system out there(if you configured it the right waycheeky). The major trouble with installing a software's in Linux distribution's is the truth that, one of a kind distribution's use specific techniques to install a software.

Here, on this publish we can be discussing a very famous device used to install application's in Red Hat Linux system's(even fedora,centos and all red hat like machine's). That's none other than the very famous YUM.


Introduction to YUM
YUM stands for Yellowdog Updater, Modified. Like all different application's in Linux, YUM is likewise an open supply tool.

It became initially utilized in Duke University, for handling package deal installation on their Red Hat based totally device's. These day's its been extensively used by almost all Red Hat based gadget's. In reality its the default software installer and bundle management tool in recent times.

If you're interested in traveling the respectable home web page of YUM, then i might suggest, travelling the beneath link of Duke university.

Http://linux.Duke.Edu/tasks/yum/


What are applications in Linux?
Red hat Linux,Fedora & all other red hat based distributions makes use of RPM as their essential software program installation package device.

A Linux software program bundle is not anything but a compressed archive of files,including a specific product information,software files,icons,libraries and many others. Which allows the functioning of that software package deal.

RPM is the default bundle set up tool used in Red Hat Linux. RPM stands for Red Hat Package Manager.

All required files of an application is compiled in a single report format known as with a record extension of .Rpm. The Red Hat package manager device, that's established in all RPM primarily based device, knows the way to open and set up those .Rpm files inside the gadget(.Rpm files are compiled and are geared up to install, they also perform a dependency prerequisite test for all required libraries before installing a specific package deal.)

RPM itself is a large subject matter, so we can be masking that during separate publish, in first rate detail.


So if RPM is already there, why turned into YUM made?
RPM and YUM are absolutely two various things. RPM is the package deal supervisor device which installs the package. YUM is a repository control device for you to fetch the perfect package deal to your precise version of Linux(in conjunction with all different required programs).

Repositories is an prepared series of packages that YUM makes use of. YUM can use these repositories to fetch the perfect and genuine model of a particular package deal compatible on your gadget. Previously earlier than YUM(or before the lifestyles of such repository control tools), the user had to fetch the rpm package for installation, and if a dependency problem arises, the user needed to fetch the ones dependencies from internet or some other resources.

YUM will comprise the URL's(Uniform Resource Locators) of various repositories in its configuration documents. You can in fact update all the installed programs to your device, with the assist of a unmarried YUM command(yum will fetch exclusive programs from appropriate exclusive repositories.)


Let's create a yum repository for better information.
Let's create a yum repository from the programs that we have within the Red Hat/Centos installation DVD. Creating a YUM repository will help you to understand the concept of a YUM repository carefully.

You get a big quantity of packages(improvement gear & application programs and so forth), within the set up disk. However all aren't established, whilst you installation the operating system.

Later on in case you want a specific bundle, its by no means advisable to insert the installation disk once more, and fetch that required .Rpm bundle and installation it. Again in case you face dependency issues, you want to fetch that dependency package deal once again(every so often there are but every other dependency package deal required for installing your dependency packagecheeky. So it becomes a tedious job).

Let's undergo a step by step method of making a local YUM repository.

Step 1: Copy all the .Rpm packages out of your Installation disk(additionally all of your amassed programs) to an remoted folder in your machine.

Step 2: For showing you this situation, i will be copying all the .Rpm programs inner /var/yum folder

?
1
2
3
4
five
6
7
8
[root@slashroot2 yum]# pwd
/var/yum
[root@slashroot2 yum]# ls
a2ps-four.13b-57.2.El5.I386.Rpm
acl-2.2.39-three.El5.I386.Rpm
acpid-1.0.4-7.El5.I386.Rpm
adaptx-zero.9.Thirteen-3jpp.1.I386.Rpm
adaptx-document-0.9.Thirteen-3jpp.1.I386.Rpm


If you see the above output(there are around 2000 packages in the set up disk, i've not shown the complete output.), all programs from the set up disk are copied internal /var/yum.

As i informed earlier than, a repository is nothing but a collection of applications in a directory. YUM turned into made, so that an running device can use distinctive repositories on the equal time.

It isn't always in any respect feasible for an working gadget to download the entire repository(due to the fact a repository is now and again very large within the length of Gigabytes. And YUM was designed to fetch and download most effective the ones packages which might be required to put in your desired software program on demand.) to install the packages required. For instance, if i need to put in a bundle referred to as "Perl",  YUM need to first have the listing of all of the package deal's in a repository(note the reality that it simplest calls for the listing, no longer the bundle)

YUM will down load the entire listing of programs to be had in a repository(the listing will include the bundle names within the repository,bundle details and so on). Not that it will down load simplest the listing of programs with info, not the applications. After downloading the listing, If yum became able to fetch all the dependencies on your required package(from that repository or other repositories) yum will deploy it after confirming with you.

Now shall we make that file, with a view to be containing the bundle names and other repository information. For this, there is some other tool referred to as "Createrepo" . Let's see what createrepo does.

?
1
2
3
four
five
6
[root@localhost var]# createrepo /var/yum/
2669/2669 - orca-1.0.Zero-five.El5.I386.Rpm
Saving Primary metadata
Saving record lists metadata
Saving different metadata
[root@localhost var]#
In the above instance, i have ran createrepo command with the directory "/var/yum" as a controversy(you need to install "createrepo" package for that command. You will get that in the set up disk, so installation it with "rpm -ivh createrepo-XX-XX-XX.Noarch.Rpm").

?
1
2
3
[root@localhost yum]# ll sixteen:40 repodata
[root@localhost yum]#
After strolling "createrepo" for our repository listing you'll have an extra directory together with the applications within the repository. This directory is known as as "repodata"

Lets see what's internal that directory.

?
1
2
three
four
five
6
7
8
9
[root@localhost repodata]# pwd
/var/yum/repodata
[root@localhost repodata]# ll
overall 13840
-rw-r--r-- 1 root root  3021610 Feb 10 16:39 filelists.Xml.Gz
-rw-r--r-- 1 root root 10148949 Feb 10 sixteen:39 other.Xml.Gz
-rw-r--r-- 1 root root   969664 Feb 10 sixteen:39 primary.Xml.Gz
-rw-r--r-- 1 root root      951 Feb 10 sixteen:40 repomd.Xml
[root@localhost repodata]#
You can certainly see there are four documents internal that listing.

Let's apprehend the contents of each and each document in detail.


What's filelists.Xml.Gz in YUM?

Let's see what is inside that compressed file with the help of "zcat". For rationalization i have copied one line from the report "filelists.Xml.Gz".

?
1
<package pkgid="deee52b24486906ee52576ee471b57061ccd5544" name="php-mbstring" arch="i386"><version epoch="0" ver="5.1.6" rel="32.El5"/><file>/and so on/personal home page.D/mbstring.Ini</file><file>/usr/lib/personal home page/modules/mbstring.So</file></package>


If you see the above line, the primary access tell's the package deal ID, with a purpose to uniquely pick out the package.

The 2nd access "call" ofcourse shows the name of the bundle.



It also mentions the structure, model and also the release of the package.

An critical fact to word is that, it also offers the information approximately the document's which might be going to be set up at the system, in case you install this bundle. Installing this package deal, will deploy two files specifically,

/etc/php.D/mbstring.Ini

/usr/lib/php/modules/mbstring.So

Wow isnt that cool? So that filelists.Xml.Gz will incorporate the whole records approximately all of the applications within the repository. This file can be utilized by YUM to fetch info of all the packages inside the repository.

What's number one.Xml.Gz in YUM?
Let's get the detail's of that specific same package deal from primary.Xml.Gz document. Lets see what is internal this record.

?
1
<package type="rpm"><name>php53-mbstring</name><arch>i386</arch><version epoch="0" ver="5.3.3" rel="5.El5"/><checksum type="sha" pkgid="YES">e4d153d1ac6f71fa50bb6587cf13b324ee44537c</checksum><summary>A module for PHP programs which need multi-byte string coping with</summary><description>The php-mbstring package carries a dynamic shared item in order to upload

So this report additionally includes package info. But it consists of a few additional records's just like the following.

Form of the packet
sha hash
And a summery of the package
If you have got observed the record "filelists.Xml.Gz" incorporates  the information approximately the document's a particular package deal will set up at the machine. So if you dont have "filelists.Xml.Gz" internal your repository, then you may no longer be capable of seek the repository with your required file(this form of looking is carried out to perceive, which package deal provides a specific record.)

Most of the applications set up lots variety of documents on the system. Thats why the record "filelists.Xml.Gz" is simply too large.


What is repomd.Xml in yum?
The file remomd.Xml includes the information about all the documents in the repsitory. The contents of remomd.Xml is as shown under.

?
1
2
3
four
five
6
7
8
9
10
11
12
thirteen
14
15
sixteen
17
18
19
20
21
<?Xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.Duke.Edu/metadata/repo">
  <data type="other">
    <location href="repodata/other.Xml.Gz"/>
    <checksum type="sha">53349b063023303c5976135a7e485b0aa932ba6f</checksum>
    <timestamp>1360494599</timestamp>
    <open-checksum type="sha">2245d5a3cf0c3398a28b0c63948ecdf58668041e</open-checksum>
  </data>
  <data type="filelists">
    <location href="repodata/filelists.Xml.Gz"/>
    <checksum type="sha">35d6d80d5b115f0da3452534c1f5cf9c0efcef3f</checksum>
    <timestamp>1360494599</timestamp>
    <open-checksum type="sha">5d1f2791794e1cc20590099a962cf5260f942b7a</open-checksum>
  </data>
  <data type="primary">
    <location href="repodata/primary.Xml.Gz"/>
    <checksum type="sha">afe11b0976096135357e11e2ff1707d88ebef6fd</checksum>
    <timestamp>1360494599</timestamp>
    <open-checksum type="sha">976baa466007d496accfa24922f2f0722c56f1dd</open-checksum>
  </data>
</repomd>
It inform's the information about all the other documents in the repository metadata, or name it repodata.

Location of primary.Xml.Gz,filelists.Xml.Gz,different.Xml.Gz
their amendment time stamp
their checksum


What is other.Xml.Gz in yum?
This record contains the entire statistics approximately a bundle like the following

Author
Version information
Changelog
Bug fixes from previous versions and so forth
This document is used whilst a consumer queries information about a package with the assist of "repoquery" command. This command is a part of yum-utils package.

We could be discussing "YUM" instructions, and other util's that can be used to question repositories in another post, due to the fact that wishes unique attention.

Other.Xml.Gz is the largest repo document because it includes plenty of model precise information and trade log of a selected package deal.



How to enable the YUM repo, i just created with createrepo for my device?
The primary configuration file for yum is /and many others/yum.Conf. Let's see the contents of that file.

?
1
2
three
4
5
6
7
8
9
10
11
12
thirteen
14
15
sixteen
17
18
19
[root@localhost ~]# cat /etc/yum.Conf
[main]
cachedir=/var/cache/yum
keepcache=zero
debuglevel=2
logfile=/var/log/yum.Log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
bugtracker_url=http://insects.Centos.Org/yum5bug
# Note: yum-RHN-plugin would not honor this.
Metadata_expire=1h
installonly_limit = 5
# PUT YOUR REPOS HERE OR IN separate files named file.Repo
# in /and many others/yum.Repos.D
[root@localhost ~]#


the second remaining line within the document "yum.Conf", says that you could both put your repository configuration details here, or inner /and so forth/yum.Repos.D/, with the extension of .Repo.

So let's now create the file referred to as neighborhood.Repo(You can do that with any call of your desire. Only remember the fact that the extension ought to be .Repo.)

?
1
2
three
four
5
6
7
[root@localhost yum.Repos.D]# pwd
/and many others/yum.Repos.D
[root@localhost yum.Repos.D]# cat local.Repo
[localrepo]
baseurl=record:///var/yum/
gpgcheck=zero
[root@localhost yum.Repos.D]#


In the above instance i've created the document named nearby.Repo interior /etc/yum.Repos.D/ wih 3 lines.

The first line indicates the repo name,

the second line indicates the URL of the repository. I actually have used file:///, due to the fact its in my neighborhood machine. The first two "//", in the URL indicates the protocol slashes, the 1/3 decrease suggests the Linux root filesystem "/"

You can also area your repository internal your FTP domestic directory to run with FTP protocol(You may be using ftp://YOURIP/FTP HOME because the baseurl).

Also you may use HTTP protocol, after putting this on your record ROOT in Apache and giving suitable URL in "baseurl" argument.

The third line ask's to disregard key checking(Don't worry, i'm able to consist of them in my second post approximately yum.)

allow's strive putting in one package via our newly created repository.

?
1
2
3
4
5
6
7
8
nine
10
eleven
12
13
14
15
sixteen
17
18
19
20
21
22
23
[root@localhost yum.Repos.D]# yum set up Hypertext Preprocessor-mbstring
Loaded plugins: fastestmirror, safety
Repository 'localrepo' is lacking call in configuration, using id
Loading replicate speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction take a look at
---> Package personal home page-mbstring.I386 0:5.1.6-32.El5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
 Package                                                     Arch                                                Version                                                      Repository                                                Size
=============================================================================================================================================================================================================================================
Installing:
 Hypertext Preprocessor-mbstring                                                i386                                                5.1.6-32.El5                                                 localrepo                                                996 okay
  
Transaction Summary
=============================================================================================================================================================================================================================================
Install       1 Package(s)
<div id="kekf"><a href="http://vafopoulos.Org/easy-money-on-internet">vafopoulos.Org/easy-money-on-internet</a></div>
Upgrade       zero Package(s)
Total download size: 996 okay
Is this good enough [y/N]:
There is a cache directory for yum, where yum saves all the required documents of a repository. It includes all of the documents that we created, with the assist of "createrepo" command. They're downloaded and kept whilst you initially use a repository.

?
1
2
three
4
5
6
7
[root@localhost ~]# cd /var/cache/yum/
[root@localhost yum]# ls
base  extras  localrepo  myrepo  timedhosts.Txt  updates
[root@localhost yum]# cd localrepo/
[root@localhost localrepo]# ls
cachecookie  packages  number one.Xml.Gz  number one.Xml.Gz.Sqlite  repomd.Xml
[root@localhost localrepo]#


From the above output you may actually see that, our cache listing has got separate directories for separate yum repositories.

You may create as many repositories as you want (and positioned their .Repo documents containing the URL inner /and so forth/yum.Repos.D/).

There are also some publicly recognise yum repositories, which you could use. Some of them are listed under.

EPEL YUM repo

RPMFUSION

RPMFORGE