YUM: Yellowdog Update Modifier,rpm的前端程序,可解決軟件包相關依賴性,可在多個庫之間定位軟? ? ? ? ? ? ? ?件包,up2date的替代工具
yum repository: yum repo,存儲了眾多rpm包,以及包的相關的元數據文件(放置于特定目錄repodata下)
yum客戶端配置文件:
/etc/yum.conf:為所有倉庫提供公共配置
/etc/yum.repos.d/*.repo:為倉庫的指向提供配置
yum 最容易出錯的地方: 1 配置文件格式 寫錯? ? ? 2? ?緩存問題導致
創建 yum 源管理工具
先看光盤是否掛載? ?df?
進入? cd? /etc/yum.repos.d? ?并查看 yun.repos.d目錄下的 yum 包
查看 yum 的創建格式? ? ?用 cat? /etc/yum.conf? 查看
[main]? ?表示庫的名稱? ? 里面可以是單詞,字母, 但是不可以有空格
cachedir=/var/cache/yum/$basearch/$releasever? ? 顯示的是緩存文件夾$basearch 是cpu架構? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?$releasever是版本號
keepcache=0? ? ?保存緩存? ? (1? 表示保存緩存? 0 表示不保存緩存)
debuglevel=2? ?調試? ? 一般不動
logfile=/var/log/yum.log? ? ? ?用yum方式安裝的日志
exactarch=1? ? 精確匹配的架構
obsoletes=1
gpgcheck=1? ?檢查包和簽名的完整性 和rpm -K 一樣? (1是默認檢查 0 是不檢查 )
plugins=1? ? 插件的開啟(1是 0否)
installonly_limit=5? 并行安裝? 同時安裝包(yum不允許同時在一個機器上并行運行多個yum命令)
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=19&ref? ? ? ? ? ?bug提示路徑
distroverpkg=centos-release
想要用yum安裝需要寫配置文件? ? ?路徑? /etc/yum.repos.d? ?
文件名的后綴要以? .repo? ?結尾
一般把光盤的內容作為yum源? ?一般都用base.repo
用 vim? base.repo? ? 創建yum腳本
按照上面的腳本格式寫
[base]
name=centos? cdrom? ? ?庫名稱
baseurl=file:///media/CentOS_6.9_Final? ? ? ? ? 本地路徑格式file://
gpgcheck=1? ? 檢查包的完整性
[epel]
name=epel
baseurl=http://mirrors.aliyun.com/epel/6/$basearch? ? 網絡路徑用http”//? ? ?https://? ?ftp://
gpgcheck=1
本文來自投稿,不代表Linux運維部落立場,如若轉載,請注明出處:http://www.www58058.com/97547