rsync同步公网yum源搭建本地yum仓库
镜像同步公网yum源上游yum源必须要支持rsync协议,否则不能使用rsync进行同步。
centos源:rsync://rsync.mirrors.ustc.edu.cn/centos/
epel源:rsync://rsync.mirrors.ustc.edu.cn/epel/
同步命令:
# rsync -vrt --bwlimit=3000 --exclude=debug/ rsync://rsync.mirrors.ustc.edu.cn/epel/7/x86_64/ /data/mirrors/centos/epel7/x86_64/
_______________________________________________________________
| University of Science and Technology of China |
| Open Source Mirror (mirrors.ustc.edu.cn) |
|===============================================================|
| |
| Debian primary mirror in China mainland (ftp.cn.debian.org), |
| also mirroring a great many OSS projects & Linux distros. |
| |
| Currently we don't limit speed. To prevent overload, Each IP |
| is only allowed to start upto 2 concurrent rsync connections. |
| |
| This site also provides http/https/ftp access. |
| |
| Supported by USTC Network Information Center |
| and USTC Linux User Group (http://lug.ustc.edu.cn/). |
| |
| Sync Status: https://mirrors.ustc.edu.cn/status/ |
| News: https://servers.ustclug.org/ |
| Contact: lug@ustc.edu.cn |
| |
|_______________________________________________________________|
receiving incremental file list
./
x86_64/
x86_64/0/
x86_64/0/0ad-0.0.22-1.el7.x86_64.rpm
x86_64/0/0ad-data-0.0.22-1.el7.noarch.rpm
...
# rsync -vrt rsync://mirrors.ustc.edu.cn/centos/7/os/x86_64/ /data/mirrors/centos/7/os/x86_64/
# rsync -vrt rsync://mirrors.ustc.edu.cn/centos/7/extras/x86_64/ /data/mirrors/centos/7/extras/x86_64/
# rsync -vrt rsync://mirrors.ustc.edu.cn/centos/7/updates/x86_64/ /data/mirrors/centos/7/updates/x86_64/
# rsync -vrt --bwlimit=20000 rsync://rsync.mirrors.ustc.edu.cn/centos/6.9/ /data/mirrors/centos/6.9/
# rsync -vrt --bwlimit=20000 --exclude=debug/ rsync://rsync.mirrors.ustc.edu.cn/epel/6/x86_64/ /data/mirrors/centos/epel6/x86_64/
配置apache发布镜像目录,当然也可以用nginx或者其他web服务器。
# vim /etc/httpd/conf/httpd.conf
# 注释掉这一段
# <Directory />
# AllowOverride none
# Require all denied
# </Directory>
# 添加这一段
Alias /centos "/data/mirrors/centos/"
<Directory "/data/mirrors/centos">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# /etc/init.d/httpd reload
最后,配置repo就可以使用了。
[base]
name=CentOS-$releasever - Base
baseurl=http://10.100.10.89/centos/$releasever/os/$basearch/
enable=1
gpgcheck=0
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://10.100.10.89/centos/$releasever/updates/$basearch/
enable=1
gpgcheck=0
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://10.100.10.89/centos/$releasever/extras/$basearch/
enable=1
gpgcheck=0
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://10.100.10.89/centos/epel/7/$basearch
enabled=1
gpgcheck=0
rsync同步公网yum源搭建本地yum仓库的更多相关文章
- centos配置网络yum源 和本地yum源
一,网络yum源 1.备份 yum文件 cd /etc/ cp -r yum.repos.d yum.repos.d.bak 2.在系统联网的情况下执行下面命令下载 wget -O /etc/yu ...
- Linux 本地yum源搭建和网络yum源搭建
一.本地yum源搭建 首先挂载上光盘 [root@www /]# mount /dev/cdrom /media/cdrom/ 系统默认已经安装了可使用yum的软件包,所以可以直接配置: [root@ ...
- CentOS 7搭建本地yum源和局域网yum源
这两天在部署公司的测试环境,在安装各种中间件的时候,发现各种依赖都没有:后来一检查,发现安装的操作系统是CentOS Mini版,好吧,我认了:为了完成测试环境的搭建,我就搭建了一个局域网的yum源. ...
- 【Linux】YUM源搭建
YUM是什么? YUM是什么 基于rpm但更胜于rpm的软件管理工具: YUM有服务端和客户端: 如果服务端和客户端在同一台机器,这是本地YUM: 如果服务端和客户端不在同一台机器,这是网络YUM. ...
- 搭建本地yum源并定时同步
在生产中内网的机器都是不能访问外网,所以需要搭建本地yum源.以中国科学科技大学的yum源为基准.http://mirrors.ustc.edu.cn/ 有些模块会同步失败,可以wget下载至指定位置 ...
- 基于VSFTP的本地YUM源及光盘YUM源搭建
基于VSFTP的本地YUM源及光盘YUM源搭建 一.yum环境的本地源搭建(基于VSFTP): 1)安装vsftp; *********************************** ...
- 使用光盘搭建本地yum源
刚装好的系统,想安装一些常用软件和一些包组的时候,就可以使用安装光盘搭建本地yum 第一步:挂载安装光盘 mount /dev/cdrom /mnt 第二步:编辑repo yum源文件 [root@l ...
- 使用光盘无网络搭建本地yum源仓库
目录 一:使用光盘搭建本地yum源 1,按顺序搭建本地yum源 第一步 : 搭载安装光盘 第二步 : 编辑repo yum源文件 第三步 : 检查 yum makecache 注意事项: 一:使用光盘 ...
- 在linux上搭建本地yum源
准备yum仓库的光盘镜像IOS文件: 设置光驱加载本地磁盘的yum仓库的光盘镜像文件: 在linux的命令行输入setup命令打开设置窗口,选择"System Service": ...
随机推荐
- SSO流程
SSO SSO又名单点登录,用户只需要登录一次就可以访问权限范围内的所有应用子系统.举个简单的例子,你在百度首页登录成功之后,你再访问百度百科.百度知道.百度贴吧等网站也会处于登录状态了,这就是一个单 ...
- ADO.net中DataTable的应用
一.思维导图 二.知识点描述 (1)构造函数 DataTable() 不带参数初始化DataTable类的新实例 DataTable(string tableName) 用指定的表名初始化DataT ...
- django orm 操作表
django orm 操作表 1.基本操作 增 models.Tb1.objects.create(c1='xx', c2='oo') 增加一条数据,可以接受字典类型数据 **kwargs inser ...
- FFT(快速傅里叶变换)算法详解
多项式的点值表示(Point Value Representation) 设多项式的系数表示(Coefficient Representation): \[ \begin{align*} \mathr ...
- AI入门课程资源
企业 kaggle https://www.kaggle.com/learn/overview Google 介绍 https://developers.google.cn/machine-lea ...
- 20172308 实验三《Java面向对象程序设计 》实验报告
20172308 2017-2018-2 <程序设计与数据结构>实验三报告 课程:<程序设计与数据结构> 班级: 1723 姓名: 周亚杰 学号:20172308 实验教师:王 ...
- iOS自学-监听按钮点击、提醒框
//事件监听的问题 CGRect btn2Frame = CGRectMake(100.0, 150.0, 60.0, 44.0); //两种不同的方式创建 UIButton *btn2 = [UIB ...
- Servlet 3.0对上传的支持
Servlet 2.5 进行上传 首先对表单的要求 ->method ="post" ->enctype="multipart/form-d ...
- GITHUB随笔 15-5月 junit
junit 是用来做单元测试的一个工具 测试是一个持续的过程.也就是说测试贯穿与开发的整个过程中,单元测试尤其适合于迭代增量式的开发过程. @ignore: 该元数据标记的测试方法在测试中会被忽 ...
- 【贪心算法】POJ-3262
一.题目 Description Farmer John went to cut some wood and left N (2 ≤ N ≤ 100,000) cows eating the gras ...