制作本地yum镜像站

1、yum源站地址:http://mirrors.ustc.edu.cn/

      也可以用网易等等其他的镜像站,我选择这个镜像站因为他的软件比较全。

2、填写自己不进行软件包同步的目录,全部同步的话我的磁盘容量受限

# cat exclude_centos.list

images/
EFI/
isolinux

# cat exclude_epel.list

debug/
repoview/

里面包含各种软件仓库,大家可以随意做各种镜像站,我这里只选择centos和epel。


3、创建同步脚本

# cat yum_rsync.sh

#!/bin/sh


#Centos 6 Repository Base 

/usr/bin/rsync -avrt rsync://mirrors.ustc.edu.cn/centos/6/os/x86_64/ --exclude-from=/home/repository/exclude_centos.list /home/repository/centos/6/os/x86_64


#Centos 6 Repository Updates

/usr/bin/rsync -avrt rsync://mirrors.ustc.edu.cn/centos/6/updates/x86_64/ --exclude-from=/home/repository/exclude_centos1.list /home/repository/centos/6/updates/x86_64


#Repoforge repository

#/usr/bin/rsync -avrt rsync://mirrors.ispros.com.bd/repoforge/ --exclude-from=/home/repository/exclude_repoforge.list /home/repository/repoforge/


#EPEL 6 Repository

/usr/bin/rsync -avrt rsync://mirrors.ustc.edu.cn/epel/6/x86_64/ --exclude-from=/home/repository/exclude_epel.list /home/repository/epel/6/x86_64



评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值