码迷,mamicode.com
首页 > 其他好文 > 详细

制作red hat本地光盘yum

时间:2014-11-28 06:35:03      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:linux

#!/bin/bash

read -p "请确认插入系统光盘,然后按Enter继续"

mkdir -p /mnt/centos6.5

mount /dev/cdrom /mnt/centos6.5


cat > /etc/yum.repos.d/centos-debuginfo.repo << EOF

[Cluster]

name=Cluster Directory

baseurl=file:///mnt/centos6.5/Cluster

enabled=1

gpgcheck=0


[ClusterStorage]

name=ClusterStorage Directory

baseurl=file:///mnt/centos6.5/ClusterStorage

enabled=1

gpgcheck=0


[Server]

name=Server Directory

baseurl=file:///mnt/centos6.5/Server/

enabled=1

gpgcheck=0


[VT]

name=VT Directory

baseurl=file:///mnt/centos6.5/VT

enabled=1

gpgcheck=0

EOF


sed -e ‘411s/url/\"\/mnt\/rhel5\/Server\"/g‘ /usr/lib/python2.4/site-packages/yum/yumRepo.py > /tmp/123

mv -f /tmp/123 /usr/lib/python2.4/site-packages/yum/yumRepo.py

yum install mysql*

本文转载自维斯亚技术论坛:http://www.w4ya.com

制作red hat本地光盘yum

标签:linux

原文地址:http://dragon123.blog.51cto.com/9152073/1583465

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!