|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
如果您觉得本篇CentOSLinux教程讲得好,请记得点击右边漂浮的分享程序,把好文章分享给你的好朋友们!
- 当地搭建当地yum源接纳的rpm全体来自CentOS-6.5-bin-DVD1&DVD2;
- 我的是在假造机情况装置,先反省我的操纵体系版本:
[size=1em][size=1em][adam@ultraera~]$uname-m
[size=1em]i686
[size=1em][adam@ultraera~]$cat/etc/centos-release
[size=1em]CentOSrelease6.5(Final)
3.由于设置当地yum源必要修正/目次下的文件及/etc上面的设置文件,倡议改换到root用户;“su-”
4.起首在当地创立一个寄存rpm包的目次,我这里选择间接在/下创立,你能够自界说:
[size=1em][size=1em][root@ultraera~]#mkdir/yumload
[size=1em][root@ultraera~]#cd/yumload/
[size=1em][root@ultraerayumload]#pwd
[size=1em]/yumload
5.接上去把两张DVD中的Packages中的rpm包全体拷贝到/yumload:
[size=1em][size=1em][root@ultraerayumload]#cp/media/CentOS_6.5_Final/Packages/*./
[size=1em][root@ultraerayumload]#ll./*.rpm|wc-l#两张DVD一共有的rpm包的数目;
[size=1em]4802
6.然后利用createrepo指令创立当地repo,CentOS6默许不装置createrepo,必要手动装置,不妨,在我们的DVD光盘中已集成了createrepo的包,假如报必要依附装置其他包的利用,顺次装置便可。
[size=1em][size=1em][root@ultraerayumload]#rpm-ivhcreaterepo-0.9.9-18.el6.noarch.rpm#装置createrepo
[size=1em][root@ultraerayumload]#createrepo/yumload/#创立yum堆栈,耐烦守候,能够加-v参数列出实行信息
[size=1em]Spawningworker0with4802pkgs
[size=1em]WorkersFinished
[size=1em]Gatheringworkerresults
[size=1em]
[size=1em]SavingPrimarymetadata
[size=1em]Savingfilelistsmetadata
[size=1em]Savingothermetadata
[size=1em]GeneratingsqliteDBs
[size=1em]SqliteDBscomplete
[size=1em][root@ultraerayumload]#
7.在/etc/yum.repo.d/下创立一个repo文件,文件名能够自界说,但必定要以repo开头,并增加一下内容:
<divstyle="padding:0px;margin:0px;color:rgb(80,80,80);font-family:宋体,ArialNarrow,arial,serif;font-size:14px;line-height:28px;"><divclass="syntaxhighlighterbash"id="highlighter_709250"style="width:720px;padding:0px!important;margin:0.3em0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow-y:visible!important;overflow-x:auto!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;box-sizing:content-box!important;font-family:Consolas,BitstreamVeraSansMono,CourierNew,Courier,monospace!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;"><divclass="container"style="padding:0px!important;margin:0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:relative!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background:none!important;">[size=1em][ultraera.org]#堆栈称号能够自界说
[size=1em]name=Thisisalocalrepo#形貌信息
<divclass="linenumber3index2alt2"style="white-space:nowrap;padding:0px1em!important;margin:0px!important;border-radius:0px!important;border:0px!important;bottom:auto!important;float:none!important;left:auto!important;line-height:1.1em!important;outline:0px!important;overflow:visible!important;position:static!important;right:auto!important;top:auto!important;vertical-align:baseline!important;width:auto!important;box-sizing:content-box!important;font-size:1em!important;min-height:inherit!important;background-image:none!important;background-attachment:initial!important;background-size:initial!important;background-origin:initial!important;background-clip:initial!important;background-position:initial!important;background-repeat:initial!important;">baseurl=file: |
|