Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Monday 28 August 2017

YUM Configuration in Linux RHEL/CentOS 6

YUM (YELLOW DOG UPDATE MODIFIER)
                YUM(Yellowdog Update Modifier) is a default package management tool in Redhat/ CentOS.By using yum tool we can install, upgrade,remove the packages and also we can see the information about packages.
         

                 YUM is an interactive tool which waits for the confirmation of a user, using this tool we can install the required package with dependencies.

For installing/Uninstalling a packages with yum :
 
Syntax : # yum where options:
 
·                                            install          
·                                            remove
·                                            list
·                                            info
·                                            update
·                                            groupinstall
·                                            groupremove
·                                            grouplist
·                                            groupinfo, etc...


You can install Packages using yum, first create a repository of all packages using these steps.

Step1: To Mount the DVD, Copy all packages in one location
        

         [root@bsrtech ~]# cd /media/path of packages

         [root@bsrtech ~]# cp *  /pkgs

          
where copy all packages in /pkgs directory

Step2: Change directory, install "createrepo" package

       [root@bsrtech ~]# cd /pkgs

       [root@bsrtech ~]# rpm -ivh createrepo

   
 Install dependencies also

       [root@bsrtech ~]# rpm -ivh python-deltaparm

       [root@bsrtech ~]# rpm -ivh deltaparm

Step3: Specify the repository location to yum.

       [root@bsrtech ~]# createrepo -v .

          where "." is present location

Step4: Create a file with repo as extension and specify the yum details in /etc/yum.repos.d

       [root@bsrtech ~]# cd /etc/yum.repos.d/

       [root@bsrtech ~]# vim pkgs.repo

                   
[mahesh-pkgs]
              

                  name        =  "pkgs"
                  baseurl     =  file:///pkgs
                  gpgcheck =  0


       where gpgcheck is to check the authentication of repository.

Local YUM repository is created successfully, now you can install any package using yum command


Note : In order to use yum repository we have to clean the yum meta data, so before installing any package firsttime, use yum clean all command show below

       [root@bsrtech ~]# yum clean all
 

To see the list of packages in index i.e repository

        [root@bsrtech ~]# yum list
 

 To see list of installed packages

        [root@bsrtech ~]# yum list installed | less
 

 To install a package using yum

       [root@bsrtech ~]# yum install firefox*
 

 To remove package using yum

       [root@bsrtech ~]# yum remove firefox* -y

     
where "y" means without confirmation.


No comments:

Post a Comment