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": ...
随机推荐
- Linux Ubuntu 安装、汉化、常用操作
一.安装Ubuntu Desktop 安装前准备 现在的PC机都可以满足要求. 软件准备 vmware:http://www.vmware.com/cn ubuntu:18ubuntu Desktop ...
- 一个可以自由存取的onedriver
https://cittedu-my.sharepoint.com/personal/jostin_5gd_me/Documents/jostin
- Python 3 利用 Dlib 19.7 进行人脸检测
0. 引言 / Overview 介绍 Dlib 中基于 HOG,Histogram of Oriented Gradients / 方向梯度直方图 实现 Face Detect / 人脸检测 的两个 ...
- IEEE1588 verision 2 报文介绍
PTP 报文 PTP verision 2 报文是由 报头 / header,主体 / body 和 报尾 / suffix 组成,报尾长度可能为 0 ; PTP verision 2 报文在 ver ...
- fetch上传文件
通过简单的配置,实现form表单文件上传 var formData = new FormData(); var fileField = document.querySelector("inp ...
- 获取session
HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()) ...
- 注册表:DWORD
百度百科 DWORD全称Double Word,是指注册表的键值,每个word为2个字节的长度,DWORD 双字即为4个字节,每个字节是8位,共32位. 在键值项窗口空白处单击右键,选择“新建”菜单项 ...
- 团队GIT实战总结
项目要求 组长博客 遇到的困难及解决办法 组员1(组长):王彬 遇到的困难 在团队任务分工的时候没有充分照顾到所有人,导致队员们的工作量不均. 现场编程时间不够 解决办法 在此对组员们表示抱歉,由于 ...
- vmware_vcenter_api
VMware Vcenter_API 介绍 本文主要通过调用Vcenter_API,获取其中的数据中心,集群,主机,网络,存储,虚拟机信息. 开发语言 python 使用官方sdk pyvmomi 文 ...
- CANOpen的几种操作以及数据
其实3年前在21ic就准备做这篇文章了,那时,CANOpen也只是刚刚在国内推广,所以几乎没有项目用到.现在有了实际的项目,完全确认了以前移植和测试的代码,所以列举一些CANOpen的底层操作以及数据 ...