Tuesday, November 20, 2012

YUM package management



YellowdogUpdatedModifier(YUM)
YellowdogUpdatedModifier(YUM)is a software package manager that installs, updates, and removes packages on RPM-based systems. It automatically computes dependencies and figures out what things should occur to install packages. yum makes it easier to maintain groups of machines without having to manually update each one using rpm.
Features include:
  • Support for multiple repositories
  • Simple configuration
  • Dependency calculation
  • Fast operation
  • RPM-consistent behavior
  • Package group support, including multiple-repository groups
  • Simple interface

yum uses an online repository by default, but you can also configure it to use a local repository of packages.
yum commands are typically run as yum <command> <package name/s>. By default, yum will automatically check all configured repositories to resolve all package dependencies during an installation/upgrade.
YUM Server configuration
Insert the DVD
[root]@raju~]#mount /dev/cdrom /mnt
[root]@raju~]#ls
[root]@raju~]# rpm  ivh vsftpd-*.rpm
[root@raju~]#vi /etc/vsftpd/vsftpd.conf
  anonymous_enable=yes
:wq!
[root]@raju~]# chkconfig vsftpd on
[root]@raju~]# service vsftpd restart
[root]@raju~]# cp –rvfp /mnt/Server/Packages /var/ftp/pub
[root]@raju~]# cd /var/ftp/pub/Server
 [root@Packages]#rpm –ivh createrepo-*.rpm
[root@Packages]#createrepo –V /var/ftp/pub
[root@raju~]cd /etc/yum.repos.d/
[root@yum.repos.d]#vi redhat.repo
[Server]
 name=rhel6
 baseurl=file:///var/ftp/pub/Server
enabled=1
gpgcheck=0
:wq!
[root@raju~]#yum clean all
[root@raju~]#yum list all
Client configuration
[root@client]cd /etc/yum.repos.d/
[root@yum.repos.d]#vi redhat.repo
[redhat]
 name=rhel6
 baseurl=ftp://192.168.0.254/pub/Server
enabled=1
gpgcheck=0
:wq!
[root@raju~]#yum clean all
[root@raju~]#yum list all

The following is a list of the most commonly-used yum commands. For a complete list of available yumcommands, refer to man yum.
yum install <package name/s>
Used to install the package or group of packages.
yum update <package name/s>
Used to update the specified packages to the latest available version.
yum check-update
This command allows you to determine whether any updates are available for your installed packages. yum returns a list of all package updates from all repositories if any are available.
yum remove <package name/s>
Used to remove specified packages, along with any other packages dependent on the packages.
yum reinstall <package name/s>
Used to reinstall specified packages, along with any other packages dependent on the packages.
yum provides <file name>
Used to determine which packages provide a specific file or feature.
yum search <keyword>
This command is used to find any packages containing the specified keyword in the description, summary, packager and package name fields of RPMs in all repositories.
yum localinstall <absolute path to package name/s>
Used when using yum to install a package located locally in the machine.

Stay Connected With Free Updates!

Subscribe via Email

Follow me!

Leave Your Comment Below If You Like This Post

0 comments: