歡迎您光臨本站 登入註冊首頁

本地:網路yum的創建

←手機掃碼閱讀     火星人 @ 2014-03-08 , reply:0

一.網路yum的創建

0.掛載光碟

1.cd /mnt/cdrom/Server
2.rpm -ivh vsftpd-2.0.5-
3.service vsftpd start
4.cd /var/ftp
5.mkdir rhel
6.cd rhel/
7.cp -a -r /mnt/cdrom/* ./
10.cd /mnt/cdrom/Server/
11.rpm -ivh createrepo-0.4.11...rpm
12.cd /var/ftp/rhel/
13.cd Server/(如果倉庫變化)
14.createrepo -g repodata/comps-rhe15-server-core.xml ./
15.cd ../VT
16.createrepo -g repodata/comps-rhe15-vt.xml ./
17.cd ../Cluster
18.createrepo -g repodata/comps-rhe15-cluster.xml ./
19.cd ../ClusterStorage/
20.createrepo -g repodata/comps-rhe15-cluster-st.xml ./
21.cd /etc/yum.repos.d/
22.cp rhel-debuginfo.repo server1.repo
23.vim server1.repo

[rhel-server]

name=Red Hat Enterprise Linux server

baseurl=ftp://192.168.101.1/rhel/Server

enabled=1

gpgcheck=1

gpgkey=ftp://192.168.101.1/rhel/RPM-GPG-KEY-redhat-release

[rhel-vt]

name=Red Hat Enterprise Linux vt

baseurl=ftp://192.168.101.1/rhel/VT

enabled=1

gpgcheck=1

gpgkey=ftp://192.168.101.1/rhel/RPM-GPG-KEY-redhat-release

[rhel-cluster]

name=Red Hat Enterprise Linux cluster

baseurl=ftp://192.168.101.1/rhel/Cluster

enabled=1

gpgcheck=1

gpgkey=ftp://192.168.101.1/rhel/RPM-GPG-KEY-redhat-release

[rhel-clusterstorage]

name=Red Hat Enterprise Linux clusterstorage

baseurl=ftp://192.168.101.1/rhel/ClusterStorage

enabled=1

gpgcheck=1

gpgkey=ftp://192.168.101.1/rhel/RPM-GPG-KEY-redhat-release

二. 本地yum的創建只需加上

24.sed -i 's&ftp://192.168.101.250/rhel&file:///mnt/cdrom&' server.repo

即只需二步

1.cd /etc/yum.repos.d/

2.vim server2.repo

[rhel-server]

name=Red Hat Enterprise Linux server

baseurl=file:///mnt/cdrom/Server

enabled=1

gpgcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

[rhel-vt]

name=Red Hat Enterprise Linux vt

baseurl=file:///mnt/cdrom/VT

enabled=1

gpgcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

[rhel-cluster]

name=Red Hat Enterprise Linux cluster

baseurl=file:///mnt/cdrom/Cluster

enabled=1

gpgcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release

[rhel-clusterstorage]

name=Red Hat Enterprise Linux clusterstorage

baseurl=file:///mnt/cdrom/ClusterStorage

enabled=1

gpgcheck=1

gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-redhat-release


[火星人 ] 本地:網路yum的創建已經有514次圍觀

http://coctec.com/docs/linux/show-post-45719.html