CentOS 6.0下使用光盘做为yum源
2012-03-07 16:44
218 查看
#加载光驱
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
echo "mount /dev/cdrom /mnt/cdrom" >> /etc/rc.local
#设置yum使用本地光盘
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.save
mv /etc/yum.repos.d/CentOS-Media.repo /etc/yum.repos.d/CentOS-Media.repo.save
echo "[DVDISO]" >> /etc/yum.repos.d/dvdiso.repo
echo "name=DVD ISO" >> /etc/yum.repos.d/dvdiso.repo
echo "baseurl=file:///mnt/cdrom/" >> /etc/yum.repos.d/dvdiso.repo
echo "enabled=1" >> /etc/yum.repos.d/dvdiso.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/dvdiso.repo
#lrzsz
yum -y install lrzsz
#vim设置
yum -y install vim-enhanced
mv /bin/vi /bin/vi.save
ln -s /usr/bin/vim /bin/vi
cp /etc/vimrc /etc/vimrc.save
sed -i "39 s/^/set number \n filetype on\n set history=1000\n syntax on\n set tabstop=4\n set softtabtop=4\n set showmatch\n set vb t_vb=\n set mouse=a\n set ignorecase\n set autowrite\n /" /etc/vimrc
来自:http://bbs.linuxtone.org/thread-1247-1-1.html
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
echo "mount /dev/cdrom /mnt/cdrom" >> /etc/rc.local
#设置yum使用本地光盘
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.save
mv /etc/yum.repos.d/CentOS-Media.repo /etc/yum.repos.d/CentOS-Media.repo.save
echo "[DVDISO]" >> /etc/yum.repos.d/dvdiso.repo
echo "name=DVD ISO" >> /etc/yum.repos.d/dvdiso.repo
echo "baseurl=file:///mnt/cdrom/" >> /etc/yum.repos.d/dvdiso.repo
echo "enabled=1" >> /etc/yum.repos.d/dvdiso.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/dvdiso.repo
#lrzsz
yum -y install lrzsz
#vim设置
yum -y install vim-enhanced
mv /bin/vi /bin/vi.save
ln -s /usr/bin/vim /bin/vi
cp /etc/vimrc /etc/vimrc.save
sed -i "39 s/^/set number \n filetype on\n set history=1000\n syntax on\n set tabstop=4\n set softtabtop=4\n set showmatch\n set vb t_vb=\n set mouse=a\n set ignorecase\n set autowrite\n /" /etc/vimrc
来自:http://bbs.linuxtone.org/thread-1247-1-1.html
相关文章推荐
- CentOS 7 使用光盘作为yum源
- CentOS/RedHat 使用光盘yum源
- CentOS使用本地光盘做yum源
- CentOS 5.6 使用光驱+系统光盘做YUM源
- centos6.5使用光盘作为本地的yum源
- centos使用光盘作为本地的yum源
- CentOS 6.x 使用安装光盘作为yum源
- rhel6.x使用本地光盘做为yum源 redhat.repo被自动清空
- centos 6.0 修改本地光盘作为yum源 使用更新的国内镜像源
- 使用CentOS光盘镜像作为YUM源安装rpm软件包
- CentOS6.5使用本地光盘做yum源 (参考:http://www.jb51.net/os/RedHat/43343.html)
- CentOS 5.11 使用光盘作为yum源
- CentOS 6使用本地光盘做yum源(tech-life 测试过可用)
- CentOS6.5使用本地光盘做yum源 (参考:http://www.jb51.net/os/RedHat/43343.html)
- centos使用光盘作为本地的yum源
- 使用CentOS光盘镜像作为YUM源安装rpm软件包
- Centos6.5使用光盘作为本地的yum源
- centos使用光盘作为本地的yum源
- centos使用光盘作为本地的yum源