Linux配置本網YUM源

來源:互聯網
上載者:User

標籤:linux   網路   

配置環境:


系統版本:

[[email protected] ~]# cat /etc/issue

Red Hat Enterprise Linux Server release 5.8 (Tikanga)

Kernel \r on an \m

系統32位:

[[email protected] ~]# getconf LONG_BIT

32


650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/6E/28/wKiom1V1KOqA-uxsAABsLi23BKs478.jpg" title="yum.jpg" alt="wKiom1V1KOqA-uxsAABsLi23BKs478.jpg" />

YUM原始伺服器,IP:192.168.2.1

YUM客戶端,IP:192.168.2.2


一、配置本地YUM原始伺服器:

 

掛在光碟片:

[[email protected] ~]# mkdir /var/ftp/rhel5

[[email protected] ~]# mount /dev/cdrom /media/

mount: block device /dev/cdrom is write-protected,mounting read-only

將光碟片中所有的檔案複製到本地/var/ftp/rhel5

[[email protected] ~]# cp -rf /media/* /var/ftp/rhel5/

查看複製內容大小:

[[email protected]calhost ~]# du -sh /var/ftp/rhel5/

3.3G   /var/ftp/rhel5/

 

安裝vsftp服務:

[[email protected] Server]# rpm -ivhvsftpd-2.0.5-24.el5.i386.rpm

warning: vsftpd-2.0.5-24.el5.i386.rpm: Header V3 DSAsignature: NOKEY, key ID 37017186

Preparing...   ############################################[100%]

1:vsftpd      ############################################[100%]

啟動vsftp服務

[[email protected] ~]# service vsftpd start

Starting vsftpd for vsftpd: [  OK  ]

重啟vsftp服務

[[email protected] ~]# service vsftpd restart

Shutting down vsftpd: [  OK  ]

Starting vsftpd for vsftpd: [  OK  ]

 

安裝createrepo外掛程式:

[[email protected] Server]# rpm -ivhcreaterepo-0.4.11-3.el5.noarch.rpm

warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3DSA signature: NOKEY, key ID 37017186

Preparing...   ###########################################[100%]

1:createrepo  ###########################################[100%]


[[email protected]]# createrepo –v /va/ftp/rhel5
[[email protected]]# createrepo –g /var/ftp/rhel5/Server/repodata//var/ftp/rhel5/Server/

[[email protected]]# createrepo –g /var/ftp/rhel5/VT/repodata/comps-rhel5-vt.xml/var/ftp/rhel5/VT/



二、配置YUM用戶端

 

[[email protected] ~]# vi /etc/yum.repos.d/rhel5.repo

[rhel5]

name=RHEL5.8x32

baseurl=ftp://121.52.215.30/rhel5

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


本文出自 “I want to be with you” 部落格,轉載請與作者聯絡!

Linux配置本網YUM源

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.