標籤: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源