Yum is software installation tool for Red hat linux and Fedora Linux. It is a complete software management system. Other option is to use up2date utility. yum is designed to use over network/internet. It does not use CDROM to install packages. If you are using fedora you don't have to install it, it is part of fedora itself.
If you don't have yum then download it from project home page http://linux.duke.edu/projects/yum/download.ptml
And then install it
rpm -ivh yum*
Step # 1: Configure yum
You need to edit /etc/yum.conf and modify/add following code to it:
vi /etc/yum.conf
Append or edit code as follows:
Code:
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
baseurl=http://mirrors.kernel.org/fedora/core/$releasever/$basearch/os
Save the file
Install GPG signature key with rpm command:
Code:
# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
and other keys too (if any using above command)
Step # 2 Update your package list:
Code:
# yum check-update
Step # 3 start to use yum
Install a new package called foo
Code:
# yum install foo
To update packages
Code:
# yum update
To update a single package called bar
Code:
# yum update bar
To remove a package called telnet
Code:
# yum remove telnet
To list all packages
Code:
# yum list installed
You can search using grep command
Code:
# yum list installed | grep samba
Display information on a package called foo
Code:
# yum info foo
To display list of packages for which updates are available
Code:
# yum list updates
--------------------------------------
/etc/yum.repos.d
---------------------------------------
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel4/
#baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel4/i386/
gpgcheck=0
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
---------------------------------------
/etc/yum.conf
----------------------------------------
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=0
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
No comments:
Post a Comment