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": ...
随机推荐
- python编辑选课系统
一.需求分析 1. 创建北京.上海 2 所学校 2. 创建linux , python , go 3个课程 , linux\py 在北京开, go 在上海开 3. 课程包含,周期,价格,通过学校创建课 ...
- Java 快排 排序
一.快排的一种 ==================== public class myMain { public static void main(String[] args) { int t[] ...
- openstack系列文章(四)
学习 openstack 的系列文章 - Nova Nova 基本概念 Nova 架构 openstack Log Nova 组件介绍 Nova 操作介绍 1. Nova 基本概念 Nova 是 op ...
- P4562 [JXOI2018]游戏
题面 题目描述 她长大以后创业了,开了一个公司. 但是管理公司是一个很累人的活,员工们经常背着可怜偷懒,可怜需要时不时对办公室进行检查. 可怜公司有 \(n\) 个办公室,办公室编号是 \(l\) 到 ...
- 暑假作业app博客
一.光照传感器 界面 简介 运用了传感器类,通过手机的感应区根据当时的光照强度显示出数据. 核心代码 protected void onCreate(Bundle savedInstanceState ...
- 20162319 实验四 Android程序设计
Android Stuidio的安装测试: 完成Hello World, 要求修改res目录中的内容,Hello World后要显示自己的学号 ·实验过程 完成任务一,只需在Android应用程序文件 ...
- 文件名命工具类(将指定目录下的文件的type类型的文件,进行重命名,命名后的文件将去掉type)
import java.io.File; /** * <b>function:</b> 文件命名工具类 * @author hoojo * @createDate 2012-5 ...
- MAVEN教程--01安装|创建|解释
Maven是一个采用纯Java编写的开 源项目管理工具.Maven采用了一种被称之为project object model (POM)概念来管理项目,所有的项目配置信息都被定义在一个叫做POM.xm ...
- dubbo面向服务使用
首先启动zookeeper dubbo集群,使用两个dubbo,一个服务,一个调用,使用zookeeper管理 zeekeeper的功能:管理集群,保证集群成员的数据一致性和动作的协调 服务端: se ...
- 用windbg检查.NET线程池设置
比如我们在machine.config中进行了这样的设置(8核CPU): <processModel maxWorkerThreads="100" maxIoThreads= ...