日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

rhel 4/oracle linux 4/centos linux 4 配置本地yum资源库

發布時間:2023/12/20 linux 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 rhel 4/oracle linux 4/centos linux 4 配置本地yum资源库 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

? ? ?最近在rhel4上面安裝oracle 9i的時候,發現gcc沒有安裝,于是手動rpm去安裝,報多個包的依賴,無賴啊。安裝rhel5的方式,配置了yum資源庫,不能使用,才發現rhel4下面沒有repodata相關的文件,在rhel5后面,光盤中自帶有這些目錄與文件,所以我們需要手動去創建相關的文件。

????? repodate目錄下面有以下文件:

  • [root@i?repodata]#?ls?-lrt?
  • total?9564?
  • -rw-r--r--??1?root?root?????951?Dec?22?04:18?repomd.xml?
  • -rw-r--r--??1?root?root??578572?Dec?22?04:18?primary.xml.gz?
  • -rw-r--r--??1?root?root?7023387?Dec?22?04:18?other.xml.gz?
  • -rw-r--r--??1?root?root?2161684?Dec?22?04:18?filelists.xml.gz?
  • ???? 手動創建repodate目錄,需要用到createrepo這個命令,在rhel4光盤中默認是沒有這個包,我們需要手動去下載,這個包我隨后會上傳上來。

    ???? 下面是創建的過程。

    1,安裝createrepo包

  • [root@i?soft]#?ls?
  • createrepo-0.4.6-1.el4.rf.noarch.rpm?
  • [root@i?soft]#?rpm?-ivh?*.rpm?
  • warning:?createrepo-0.4.6-1.el4.rf.noarch.rpm:?V3?DSA?signature:?NOKEY,?key?ID?1aa78495?
  • Preparing...????????????????###########################################?[100%]?
  • ???1:createrepo?????????????###########################################?[100%]?
  • 2,手動mount光盤到目錄

  • [root@i?~]#?mkdir?/media/rhel4?
  • [root@i?~]#?mount?/dev/cdrom?/media/rhel4?
  • mount:?block?device?/dev/cdrom?is?write-protected,?mounting?read-only?
  • 3,創建repodate

  • [root@i?~]#?cd?/media?
  • [root@i?media]#?createrepo?./?
  • 1871/1871?-?rhel4/SRPMS/comps-4AS-0.20090520.src.rpm????????????????????????????.x86_64.rpm6_64.rpmm?
  • Saving?Primary?metadata?
  • Saving?file?lists?metadata?
  • Saving?other?metadata?
  • 4,配置本地repo文件

  • [root@i?repodata]#?cd?/etc/yum.repos.d/?
  • [root@i?yum.repos.d]#?ls?
  • [root@i?yum.repos.d]#?vi?local.repo?
  • [rhel4.8]?
  • name=rhel4.9?
  • baseurl=file:///media/?
  • enabled=1?
  • gpgcheck=0?
  • [root@i?yum.repos.d]#?yum?list?
  • Setting?up?repositories?
  • rhel4.8???????????????????100%?|=========================|??951?B????00:00??????
  • Reading?repository?metadata?in?from?local?files?
  • primary.xml.gz????????????100%?|=========================|?565?kB????00:00??????
  • rhel4.8???:?##################################################?1871/1871?
  • Added?1871?new?packages,?deleted?0?old?in?5.44?seconds?
  • Installed?Packages?
  • 4Suite.x86_64????????????????????????????1.0-3??????????????????installed????????
  • Canna-libs.i386??????????????????????????3.7p3-9.el4????????????installed????????
  • FreeWnn-libs.i386????????????????????????1:1.10pl020-6.el4??????installed????????
  • GConf2.i386??????????????????????????????2.8.1-2.el4????????????installed????????
  • GConf2.x86_64????????????????????????????2.8.1-2.el4????????????installed???
  • 5,yum的命令

  • [root@i?yum.repos.d]#?yum?-help?
  • usage:?yum?[options]?<?update?|?install?|?info?|?remove?|?list?|?
  • ????clean?|?provides?|?search?|?check-update?|?groupinstall?|??
  • ????groupupdate?|?grouplist?|?groupinfo?|?groupremove?|?
  • ????makecache?|?localinstall?|?erase?|?upgrade?|?whatprovides?|?
  • ????localupdate?|?resolvedep?|?shell?|?deplist?>?
  • ?
  • options:?
  • ??-h,?--help????????????show?this?help?message?and?exit?
  • ??-t,?--tolerant????????be?tolerant?of?errors?
  • ??-C????????????????????run?entirely?from?cache,?don't?update?cache?
  • ??-c?[config?file]??????config?file?location?
  • ??-R?[minutes]??????????maximum?command?wait?time?
  • ??-d?[debug?level]??????debugging?output?level?
  • ??-e?[error?level]??????error?output?level?
  • ??-y????????????????????answer?yes?for?all?questions?
  • ??--version?????????????show?Yum?version?and?exit?
  • ??--installroot=[path]??set?install?root?
  • ??--enablerepo=[repo]???enable?one?or?more?repositories?(wildcards?allowed)?
  • ??--disablerepo=[repo]??disable?one?or?more?repositories?(wildcards?allowed)?
  • ??--exclude=[package]???exclude?package(s)?by?name?or?glob?
  • ??--obsoletes???????????enable?obsoletes?processing?during?updates?
  • ??--noplugins???????????disable?Yum?plugins?
  • yum命令的使用,見man yum


    ? ? ?本文轉自7343696 51CTO博客,原文鏈接:http://blog.51cto.com/luoping/1096764,如需轉載請自行聯系原作者



    總結

    以上是生活随笔為你收集整理的rhel 4/oracle linux 4/centos linux 4 配置本地yum资源库的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。