2010/12/27

Published 12月 27, 2010 by with 0 comment

Yum 架設教學






說明

自行架設Yum Server








Cacti RedHat EL 5 架設教學

OS: RedHat EL5


Step 1.設定ISO掛載安裝YUM安裝RPM檔


1. 掛載 RHEL 5.3 DVD
mkdir -p /media/RHEL5
mount /dev/hdc /media/RHEL5


Step 2. 架設FTP或WWW Server(請查看鳥哥文件,Server端安裝執行)


在RHEL Source底下,需要產生檔案下需要"repodata"資料夾,


產生方法:


先安裝"createrepo-0.4.11-3.el5"RPM File


#rpm -ivh createrepo-0.4.11-3.el5


在baseurl底下產生repodata 目錄:


#createrepo /opt/lampp/htdocs/RHEL57


執行完之後,在此目錄底下,即會多了repodata資料夾


Step 3.設定YUM安裝RPM檔(Client端)


直接修改設定檔 /etc/yum.repos.d/rhel-debuginfo.repo 當然也可新增一個  repository 檔案名稱可任意,並請以 repo 為副檔名,檔內容如下:


(http為連線路徑)



vi /etc/yum.repos.d/rhel-debuginfo.repo


[Server]
name=RHEL Server Repository
baseurl=http://10.55.78.14/RHEL54
enabled=1
gpgcheck=0


[rhel-Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=http://10.55.78.14/RHEL54/Server
enabled=1
gpgcheck=0


[rhel-VT]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=http://10.55.78.14/RHEL54/VT
enabled=1
gpgcheck=0


[rhel-Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=http://10.55.78.14/RHEL54/ClusterStorage
enabled=1
gpgcheck=0



 



 









 



參考資料

RHEL5 - system-config-packages


http://benjr.tw/?q=node/547#comment-259


http://www.babyface2.com/NetAdmin/21200710yum/
 





Error Message

 


[root@server /]# yum update    OR     yum list all
Loaded plugins: refresh-packagekit, rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
ftp://192.168.24.145/pub/Packages/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - ""
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: server. Please verify its path and try again



原因:因為在Server端無產生repodata資料夾,找不到repository metadata


0 意見:

張貼留言