Setup the Yum server on RHEL5

 Yum 已直接內建於RHEL5的版本中,可直接使用,只不過預設是Yum 的client端。如果想要在內網中建一台Yum server 則可由下列方式達成。

Part I  : Yum server setup 

安裝前準備:RHEL5 source.  
所需的Service及套件 : HTTPD, Vsftpd, createrepo
 一、安裝vsftpd  => rpm -ivh vsftpd-2.o.5-10.el5.i386.rpm
 二、安裝httpd => httpd-2.2.3-6.el5.i386.rpm  
 三、將Rhel5 Dvd 或 Cd中的Package 複製到  /var/ftp/pub/server/     
 四、新增一連結給 Httpd 用 => ln -s /var/ftp/pub /var/www/html/pub 
 五、啟用Httpd and Vsftpd 
           1. service httpd start
           2. chkconfig httpd on
           3.service vsftpd start
          4. chkconfig vsftp on

 六、安裝createrepo套件 => rpm -ivh createrepo-0.4.4-2.fc6.noarch.rpm
          1. 設定及建立索引 => createrepo -v /var/ftp/pub/server/VT
                                            => createrepo -v /var/ftp/pub/server/Server
                                           

           

Part II . Yum client 端設定

直接到 /etc/yum.repo.d/複製系統預設的 .repo檔。
cp rhel-debuginfo.repo my_yum.repo

vi my_yum.repo  # 編輯my_yum.repo內容。

————————-my_yum.repo———————–

[Server]   
name=Red Hat Server
baseurl=http://192.168.0.xxx/pub/server/server
 enabled=1
gpgcheck=0

[Virtual tools]
name=Redhat VT
baseurl=http://192.168.0.xxx/pub/server/VT
enabled=1
gpgcheck=0 

——————-my_yum.repo——————-

最後一步執行
#  yum clean all.

試著用yum安裝 kernel-xen
# yum install kernel-xen -y

2 到目前為止的留言

  1. Jacky on

    感謝你的提供..在茫茫大海的網路上找到你這篇..真感謝

  2. jewnlie on

    簡潔扼要,推你


發表迴響

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

連結到 %s

Follow

Get every new post delivered to your Inbox.