Lorem ipsum dolor sit amet, consectetur adipiscing elit. Test link

Search Suggest

Explain yum in linux

YUM(Yellowdog Update Modified): yum is the primary tool for installing, deleting, querying, and managing Linux RPM(Redhat Package Manager)software packages from official software repositories (base) as well as other third-party repositories.

Yum Help command
# yum help

How to configure Local Yum repository

Mount ISO on mnt(or other) diretory
mount -o loop isoname.iso /mnt

If you use DVD media use below command
# mount -o loop /dev/sr0  /mnt

If you are configuring on Virtual machine
# mount /dev/cdrom /mnt
# mount -t iso9660 /dev/cdrom /mnt

Now create a repo file in yum direcoty
#cp /etc/media.repo /etc/yum.repos.d/localrepo.repo

Edit repo file /etc/yum.repos.d/localrepo.repo

How to clear yum cache data
#yum clean all

Install a package using yum
# yum install firefox
# yum install firefox –y

How to Uninstall/Remove a package
#yum remove firefox

How to Update package
#yum update vsftpd
Note: update option will allow you to upgrade your old package version to new.

How to check available Update package information
#yum updateinfo packagename
# yum updateinfo bind

How to list specific package
# yum list vsftpd

How to list all installed package
#yum list installed

How to list all installed and available package
# yum list all

How to know the information/Version/Release/Size about package
# yum info vsftpd
How to check dependency of a package
#yum deplist nfs-utils
#yum deplist vsftpd

How to know what package a file belongs to

#yum whatprovides filename
#yum whatprovides /etc/named.conf
# yum whatprovides  /etc/passwd

How to know what package a command belongs to

#yum whatprovides *bin/commandname
#yum whatprovides *bin/nslookup

Install all the default packages by group
#yum groupinstall "Development Tools"

Update all the default packages by group
#yum groupupdate "Development Tools"

Remove all packages in a group
# yum groupremove "Development Tools"

Show enabled repository
#yum repolist

How to downgrade a package to an earlier version
#yum downgrade packagename

Đăng nhận xét