FC配置yum源为本地光驱

###/etc/yum.repos.d/rhel5-local.repo
[Cluster] 
name=Red Hat Enterprise Linux $releasever - $basearch -Cluster 
baseurl=file:///misc/cd/Cluster 
enable=1 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
[ClusterStorage] 
name=Red Hat Enterprise Linux $releasever - $basearch -ClusterStorage 
baseurl=file:///misc/cd/ClusterStorage 
enable=1 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
[Server] 
name=Red Hat Enterprise Linux $releasever - $basearch -Server 
baseurl=file:///misc/cd/Server 
enable=1 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release 
[VT] 
name=Red Hat Enterprise Linux $releasever - $basearch -VT 
baseurl=file:///misc/cd/VT 
enable=1 
gpgcheck=1 
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release


mkdir -p /var/rhel/{Cluster,ClusterStorage,Server,VT} 


createrepo -o /var/rhel/Cluster -g /misc/cd/Cluster/repodata/comps-rhel5-cluster.xml /misc/cd/Cluster 
createrepo -o /var/rhel/ClusterStorage -g /misc/cd/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /misc/cd/ClusterStorage 
createrepo -o /var/rhel/Server -g /misc/cd/Server/repodata/comps-rhel5-server-core.xml /misc/cd/Server 
createrepo -o /var/rhel/VT -g /misc/cd/VT/repodata/comps-rhel5-vt.xml /misc/cd/VT 



mount --bind  /var/rhel/Cluster/repodata  /misc/cd/Cluster/repodata 
mount --bind  /var/rhel/ClusterStorage/repodata  /misc/cd/ClusterStorage/repodata 
mount --bind  /var/rhel/Server/repodata  /misc/cd/Server/repodata 
mount --bind  /var/rhel/VT/repodata  /misc/cd/VT/repodata 

 

你可能感兴趣的:(linux,xml,redhat)