Management
about Yum configration
1.About YUM
Yellow dog Updater, Modified的简称,yum 的理念是使用一个中心仓库
(repository)管理一部分甚至一个distribution 的应用程序相互关系,根据
计算出来的依赖关系进行相关的升级、、删除等等操作,减少了 Linux
的dependencies 的问题。
YUM的关键之处是要有可靠的repository,顾名思义,这是软件的仓库,
它可以是http或ftp站点, 也可以是本地软件池。
2.How to configure yum repository and client
2.1 安裝环境:
version: v4
(according to you system version to choose RPM)
test1:10.148.55.43
test2:10.148.55.44
rpm:createrepo-0.4.8-1.src.rpm/createrepo-0.4.4-2.noarch.rpm
rpm:python-elementtree-1.2.6-5.el4.centos.i386.rpm
python-urlgrabber-2.9.8-2.noarch.rpm
sqlite-3.3.6-2.i386.rpm
python-sqlite-1.1.7-1.2.1.i386.rpm
yum-2.4.3-3.el4.centos.noarch.rpm
2.1 建庫﹕
1.test1:#rpm -ivh createrepo-0.4.4-2.noarch.rpm
http method:Copy source to /var/www/html/centos
or
ftp method: Copy source to /var/ftp/pub/centos
2.test1:# createrepo centos
4/4 - telnet-server-0.17-38.el5.i386.rpm
saving Primary metadata
saving file lists metadata
saving other metadata
2.2 建立Yum Client:
1.test2: #rpm -ivh python-elementtree ...
#rpm -ivh python-urlgrabber ...
#rpm -ivh sqlite-3.3.6 ...
#rpm -ivh python-sqlite ...
#rpm -ivh yum-2.4.3 ...
2.vi /etc/yum.conf add following red font .
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=0
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
[centos]
basename=centos
baseurl=ftp://10.148.55.43/pub/centos
enable=1
3.使用前確定服務是否正常
test2:#service vsftp status
vsftpd (pid 25952) is running...
4.test2:#yum list
zisofs-tools.i386 1.0.6-3.2.2 installed
zlib.i386 1.2.3-3 installed
zlib-devel.i386 1.2.3-3 installed
zsh.i386 4.2.6-1 installed
Available Packages
createrepo.noarch 0.4.4-2.fc6 centos
5.可以看到除了Installed還有centos中的包﹐恭喜你,現在可以使用YUM安裝任何RPM包只要庫中有的.
6.詳細用法 yum或參考以上網站.
原文:http://www.linuxdiyf.com/blog/?110920/action_viewspace_itemid_2882.html