欢迎来到天天文库
浏览记录
ID:40557970
大小:237.50 KB
页数:7页
时间:2019-08-04
《Linux配置yum服务器》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
Linux全攻略--yum服务器配置Yum(全称为YellowdogUpdater,Modified)是一个在Fedora中的shell前端软件包管理器。基于rpm包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。 软体包来源 可供Yum下载的软体包包括fedora本身的软体包以及源自rpm.livna.org的FedoraExtras,全部是由Linux社区维护的,并且基本是自由软体。所有的包都有一个独立的GPG签名,主要是为了你的系统安全。而对于Fedoracore4.0的用户,rpm.livna.org的签名是自动导入并安装的。 图形化前端Yum的图形化前端主要有yumex和kyum。它们并不是独立于Yum的,而是Yum的图形前端,也就是说在安装和使用Yumex和kyum同时,都是以Yum的安装和配置为基础;所以在用Yumex或kyum时,必须先安装配置Yum。一.做好准备工作.1.安装FTP,一般都是通过FTP来下载软件包.1.1在/mnt目录下创建cdrom,作为介质(光盘)挂载目录在虚拟机中插入Linux安装所用的ISO,将Devicestatus中的Connected选项打钩,由于光盘默认挂载到/dev/cdrom(我在/media目录下找到的)进入到光盘中的Server目录,运行vsftpd-2.0.5-16.el5.i386.rpm,安装,然后启动服务2.现在进行拷贝文件.把光盘里所有文件都拷贝到/var/ftp/pub/下.实际上只拷贝Server和VT两个文件过去就行删除*.html删除Server/repodata/TRANS.TBL删除VT/repodata/TRANS.TBL以上是建议删除的,不删除也可以.二.配置客户端 进去后添加如下内容.注意看清了内容很类似.配置文件内容简介:[]内的是仓库的名字name仓库的描述baseurl是你的YUM源地址,因为这里配置的是FTP,还可以是HTTP,FILE等enabled是否启用这个仓库,1为起用,0为禁用gpgcheck是否检查GPG签名(用来验证要安装的包是不是REDHAT官方的)GPGKEY的存放地址需要用下面的命令到入这个签名。才能使用这项功能 三.配置服务器安装createrepo工具,然后用这个工具生成YUM通用数据库.可看到一个是安装,两个操作,很类似的.也可以看到是成功的.这样就OK下四.下面看下yum的命令和进行测试. 1.yuminstall这里是安装下载的软件包,由于本实验没有提供FTP下载. 2.yumlocalinstall本地安装软件包,在这里本服务器做YUM源.看个例子. [root@rhel5/]#yumlocalinstall/var/ftp/pub/Server/dhcp*Loading"rhnplugin"pluginLoading"installonlyn"pluginThissystemisnotregisteredwithRHN.RHNsupportwillbedisabled.SettingupLocalPackageProcessExamining/var/ftp/pub/Server/dhcp-3.0.5-3.el5.i386.rpm:dhcp-12:3.0.5-3.el5.i386Examining/var/ftp/pub/Server/dhcp-devel-3.0.5-3.el5.i386.rpm:dhcp-devel-12:3.0.5-3.el5.i386Examining/var/ftp/pub/Server/dhcpv6-0.10-33.el5.i386.rpm:dhcpv6-0.10-33.el5.i386Examining/var/ftp/pub/Server/dhcpv6_client-0.10-33.el5.i386.rpm:dhcpv6_client-0.10-33.el5.i386Marking/var/ftp/pub/Server/dhcp-3.0.5-3.el5.i386.rpmtobeinstalledSettinguprepositoriesReadingrepositorymetadatainfromlocalfilesMarking/var/ftp/pub/Server/dhcp-devel-3.0.5-3.el5.i386.rpmtobeinstalledSettinguprepositoriesReadingrepositorymetadatainfromlocalfilesMarking/var/ftp/pub/Server/dhcpv6-0.10-33.el5.i386.rpmtobeinstalledSettinguprepositoriesReadingrepositorymetadatainfromlocalfilesMarking/var/ftp/pub/Server/dhcpv6_client-0.10-33.el5.i386.rpmtobeinstalledSettinguprepositoriesReadingrepositorymetadatainfromlocalfilesResolvingDependencies-->Populatingtransactionsetwithselectedpackages.Pleasewait.--->Packagedhcp.i38612:3.0.5-3.el5settobeupdated--->Packagedhcpv6.i3860:0.10-33.el5settobeupdated--->Packagedhcpv6_client.i3860:0.10-33.el5settobeupdated--->Packagedhcp-devel.i38612:3.0.5-3.el5settobeupdated-->RunningtransactioncheckDependenciesResolved============================================================================= Package Arch Version Repository Size=============================================================================Installing: dhcp i386 12:3.0.5-3.el5 /var/ftp/pub/Server/dhcp-3.0.5-3.el5.i386.rpm 2.1M dhcp-devel i386 12:3.0.5-3.el5 /var/ftp/pub/Server/dhcp-devel-3.0.5-3.el5.i386.rpm 1.4M dhcpv6 i386 0.10-33.el5 /var/ftp/pub/Server/dhcpv6-0.10-33.el5.i386.rpm 759k dhcpv6_client i386 0.10-33.el5 /var/ftp/pub/Server/dhcpv6_client-0.10-33.el5.i386.rpm 161kTransactionSummary=============================================================================Install 4Package(s) Update 0Package(s) Remove 0Package(s) Totaldownloadsize:4.4MIsthisok[y/N]:yDownloadingPackages:RunningTransactionTestFinishedTransactionTestTransactionTestSucceededRunningTransaction Installing:dhcp #########################[1/4] Installing:dhcpv6 #########################[2/4] Installing:dhcpv6_client #########################[3/4] Installing:dhcp-devel #########################[4/4]Installed:dhcp.i38612:3.0.5-3.el5dhcp-devel.i38612:3.0.5-3.el5dhcpv6.i3860:0.10-33.el5dhcpv6_client.i3860:0.10-33.el5Complete![root@rhel5/]# 3.yumupdate全部更新[root@rhel5/]#yumupdateLoading"rhnplugin"pluginLoading"installonlyn"pluginThissystemisnotregisteredwithRHN.RHNsupportwillbedisabled.SettingupUpdateProcessSettinguprepositoriesReadingrepositorymetadatainfromlocalfilesNoPackagesmarkedforUpdate/Obsoletion4.yumupdatepackage更新指定程序包package5.yumcheck-update[root@rhel5/]#yumcheck-updateLoading"rhnplugin" pluginLoading"installonlyn"pluginThissystemisnotregisteredwithRHN.RHNsupportwillbedisabled.SettinguprepositoriesReadingrepositorymetadatainfromlocalfilesck-update6.yuminfo显示安装包信息7.yumlist显示所有已经安装和可以安装的程序包8.yumlist显示指定程序包安装情况9.yumsearch查找软件包[root@rhel5/]#yumsearch"dhcp*"Loading"rhnplugin"pluginLoading"installonlyn"pluginThissystemisnotregisteredwithRHN.RHNsupportwillbedisabled.SettinguprepositoriesReadingrepositorymetadatainfromlocalfiles dhcpv6_client.i386 0.10-33.el5 installed Matchedfrom:dhcpv6_clientDHCPv6clientProvidestheclientfortheDHCPv6protocol(RFC3315)tosupportdynamicconfigurationofIPv6addressesandparameters.Seemandhcp6c(8),dhcp6c.conf(5),andthedocumentationin/usr/share/dhcpv6_client*.[url]http://dhcpv6.sourceforge.net/[/url] dhcp-devel.i386 12:3.0.5-3.el5 installed Matchedfrom:dhcp-develDevelopmentheadersandlibrariesforinterfacingtotheDHCPserverLibrariesforinterfacingwiththeISCDHCPserver.[url]http://isc.org/products/DHCP/[/url] dhcp.i386 12:3.0.5-3.el5 installed Matchedfrom:dhcpADHCP(DynamicHostConfigurationProtocol)serverandrelayagent.DHCP(DynamicHostConfigurationProtocol)isaprotocolwhichallowsindividualdevicesonanIPnetworktogettheirownnetworkconfigurationinformation(IPaddress,subnetmask,broadcastaddress,etc.)fromaDHCPserver.TheoverallpurposeofDHCPistomakeiteasiertoadministeralargenetwork. Thedhcppackageincludes theISCDHCPserviceandrelayagent.TouseDHCPonyournetwork,installaDHCPservice(orrelayagent),andonclientsrunaDHCPclientdaemon. ThedhcppackageprovidestheISCDHCPserviceandrelayagent.[url]http://isc.org/products/DHCP/[/url] dhcpv6.i386 0.10-33.el5 installed Matchedfrom:dhcpv6DHCPv6-DHCPserverandclientforIPv6ImplementstheDynamicHostConfigurationProtocol(DHCP)forInternetProtocolversion6(IPv6)networksinaccordancewithRFC3315:DynamicHostConfigurationProtocolforIPv6(DHCPv6).Consistsofdhcp6s(8),theserverDHCPdaemon,anddhcp6r(8),theDHCPv6relayagent.InstallthisifyouwanttosupportdynamicconfigurationofIPv6addressesandparametersonyourIPv6network.Seemandhcp6s(8),dhcp6r(8),dhcp6s.conf(5),andthedocumentationin/usr/share/doc/dhcpv6*.[url]http://dhcpv6.sourceforge.net/[/url][root@rhel5/]#10.yumremove|erasepackage1删除程序包 [root@rhel5/]#yumremove"dhcp*"Loading"rhnplugin"pluginLoading"installonlyn"pluginThissystemisnotregisteredwithRHN.RHNsupportwillbedisabled.SettingupRemoveProcessResolvingDependencies-->Populatingtransactionsetwithselectedpackages.Pleasewait.--->Packagedhcp.i38612:3.0.5-3.el5settobeerased--->Packagedhcpv6.i3860:0.10-33.el5settobeerased--->Packagedhcpv6_client.i3860:0.10-33.el5settobeerased--->Packagedhcp-devel.i38612:3.0.5-3.el5settobeerased-->RunningtransactioncheckDependenciesResolved============================================================================= Package Arch Version Repository Size=============================================================================Removing: dhcp i386 12:3.0.5-3.el5 installed 2.1 M dhcp-devel i386 12:3.0.5-3.el5 installed 1.4M dhcpv6 i386 0.10-33.el5 installed 759k dhcpv6_client i386 0.10-33.el5 installed 161kTransactionSummary=============================================================================Install 0Package(s) Update 0Package(s) Remove 4Package(s) Isthisok[y/N]:yDownloadingPackages:RunningTransactionTestFinishedTransactionTestTransactionTestSucceededRunningTransaction Removing :dhcp #########################[1/4] Removing :dhcpv6 #########################[2/4] Removing :dhcpv6_client #########################[3/4] Removing :dhcp-devel #########################[4/4]Removed:dhcp.i38612:3.0.5-3.el5dhcp-devel.i38612:3.0.5-3.el5dhcpv6.i3860:0.10-33.el5dhcpv6_client.i3860:0.10-33.el5Complete![root@rhel5/]#yum会把下载的软件包和header存储在cache中,而不会自动删除。如果觉得它们占用了磁盘空间,可以使用yumclean指令进行清除.yumcleanheaders清除headeryumcleanpackages清除下载的rpm包yumcleanall清除header与rpm包 基本完成,呵呵.
此文档下载收益归作者所有
举报原因
联系方式
详细说明
内容无法转码请点击此处