reposync reposync使用方式 reposync的安装配置 reposync reposync使用方式 像阿里云镜像都是禁止递归同步下载阿里云的镜像,但是在redhat的官网,我看到一个同步镜像源的解决方案 reposync,reposync就是通过指定的repoid把源同步下载,并且之前已经同步的程序包,不在继续同步 reposync的安装配置 安装 yum install -y yum-utils createrepo 从指定的库同步所有的包到一个指定的目录 reposync --gpgcheck -1 --repoid=rhel-6-server-rpms --download_path=/var/www/html www/html/<repoid> 创建一个本地存储库,允许客户机安装组和使用安全性插件 如何下载的所有元数据的存储库同步将允许使用各种插件,如“yum groupinstall”在centos6以来,reposync 支持--download-metadata 和 --downloadcomps选项 reposync --gpgcheck -1 --repoid=rhel-6-server-rpms --download_path
reposync reposync 命令用于将远程的yum存储库同步到本地目录,并使用yum来检索软件包,可以指定外网源(repo id)的软件包同步到本地文件中。 安装 reposync dnf install dnf-plugins-core reposync 选项参数 选项 含义 -c [file] 指定配置文件运行(默认配置文件是 /etc/yum.conf 删除已不在仓库中的本地软件包 创建本地存储目录 mkdir -p /repo/kylin/aarch_64/ 同步 repo 文件中软件包到本地,aarch_64目录下自动创建以 repoid 命名的目录 reposync gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kylin enabled = 0 -c 指定 repo 文件,--delete 删除已不在仓库中的本地软件包 reposync
Kubernetes 442 repolist: 24,410 下载仓库 reposync -r docker -p /yum reposync -r epel -p /yum reposync -r kubernetes -p /yum reposync -r base-ex -p /yum
/usr/bin/bash reposync -p /usr/share/nginx/html/CentOS-YUM/Aliyun/version_7/64bit/ /usr/bin/sed -i " s/7/8/g" `grep 7 -rl /etc/yum.repos.d/CentOS-Base.repo` reposync -p /usr/share/nginx/html/CentOS-YUM [root@edenluo yum.repos.d]# sh yum.reposync.sh # 等待同步完成 # 同步完成,查看文件大小,合计27G [root@edenluo CentOS-YUM /usr/bin/bash reposync -np /usr/share/nginx/html/CentOS-YUM/Aliyun/version_7/64bit/ echo "centos7 is sync complate" /usr/bin/sed -i "s/7/8/g" `grep 7 -rl /etc/yum.repos.d/CentOS-Base.repo` reposync -np
3.下载整个Yum源中所有安装包到本地服务器上 reposync:该命令很强大,可以将远端Yum仓库里面的所有安装包全部下载到本地目录中。该命令是来自于 yum-utils 软件包里面的。 centos updates - x86_64 1,169 repolist: 7,929 [root@centos ~]# reposync [root@centos ~]# reposync -r os -p /root/centos6/ [os: 1 of 6713 ] Downloading Packages/389-ds-base [root@centos ~]# reposync -r updates -p /root/centos6/ 4,查看下载到本地的整个Yum源的安装包 [root@centos ~]# ll centos6
同步源到本地文件夹(此文件夹需要结合nginx 配置成网络可访问的文件服务器:nginx location 配置详解) [root@localhost centos]# reposync -c centos-repo.conf 定时同步 crontab -e 1 2 * * * /usr/bin/reposync -np /home/centos 5. article/details/53158682 https://blog.csdn.net/moyuanbomo/article/details/81667006 可参考:可选配置文件 /usr/bin/reposync
三、实战:搭建离线YUM仓库(CentOS7为例)CentOS/RHEL系的同步相对简单,主要依靠yum-utils包中的reposync工具。 3.1在同步机上拉取数据1.安装必要工具:展开代码语言:BashAI代码解释#安装reposync和createrepoyuminstall-yyum-utilscreatereponginx2.配置你需要同步的源 展开代码语言:BashAI代码解释mkdir-p/data/centos_repo#使用reposync同步指定的repoid到指定目录#-g:同步GPGKey,-l:包含yumplugin支持,-d: 删除本地旧包,-n:只下载最新包reposync-g-l-d-n--repoid=base--newest-only--download_path=/data/centos_repo/reposync-g-l-d-n --repoid=updates--newest-only--download_path=/data/centos_repo/reposync-g-l-d-n--repoid=extras--newest-only
CentOS-OpenStack-train.repo 进行源更新: yum clean all yum makecache yum repolist 创建本地源: yum -y install vim reposync >> /etc/hosts 安装open stack: yum install centos-release-openstack-train -y 安装插件: yum -y install vim reposync yum-utils httpd net-tools 进行创建本地源: ls -l /etc/yum.repos.d/ yum repolist mkdir /var/www/html/yumrepository reposync /updates createrepo . cd .. reposync -p /var/www/html/yumrepository/ createrepo --update . /updates createrepo . cd .. reposync -p /var/www/html/yumrepository/ createrepo --update .
openstack-mitaka/ --arch=x86_64 --breed=yum 2、同步源(下载到/var/www/cobbler/repo_mirror目录下) [root@localhost ~]#cobbler reposync post $yum_config_stanza %end 5、执行cobbler sync更新配置 6、添加定时任务,定期同步repo echo "1 3 * * * /usr/bin/cobbler reposync
[root@test yum.repos.d]# reposync --repoid=openstack-newton [root@test yum.repos.d]# reposync --repoid
制作一个本地镜像 reposync configfile: [root@localhost html]# cat lustre-repo.conf [lustre-server] name=lustre-server downloads.whamcloud.com/public/e2fsprogs/latest/el7 # exclude=*debuginfo* gpgcheck=0 同步镜像: [root@localhost html]# reposync e2fsprogs-wc 如果因为网络问题,可以使用proxychains4 来进行代理访问:(proxychains4 安装教程) [root@localhost repo]# proxychains4 reposync
/cm/cloudera-manager.repo 安装相应的rpm包构建工具: yum install createrepo yum-utils httpd 缓存repo中的所有软件包: reposync
如果用户想镜像这些内容,可以使用yum-utils包中提供的reposync功能,所有的SRPM包和对应的二进制源码包使用相同的密钥签名。
delay-updates 在传输末尾把所有更新的文件放到位 --exclude=PATTERN 指定排除不需要传输的文件模式 --include=PATTERN 指定不排除而需要传输的文件模式 方法三、 使用reposync install httpd -y 使用默认配置即可,如果有特殊需求可以修改配置文件/etc/httpd/conf/httpd.conf http默认家目录/var/www/html 3、安装yum-utils提供reposync yum-utils -y 4、选择指定仓库标识作为本地yum源: 执行yum repolist命令查看yum仓库标识 使用epel作为本地yum源,用/var/www/html作为yum仓库根目录 reposync /bin/bash datetime=`date +"%Y-%m-%d"` exec > /var/log/epel.log #同步日志输出 reposync -d -r epel -p /var/www
RPM包来构建本地Yum源: httpd:使用http协议来搭建本地Yum源 createrepo:用于生成yum源各软件之间的依赖索引 yum-utils:安装后可使用 yumdownloader、reposync Qcloud centos updates - x86_64 1,169 repolist: 7,929 [root@centos ~]# reposync [root@vos7 ~]# reposync -r updates -p /var/www/html/centos6/ #下载网络Yum源仓库标识updates中所有的RPM软件包 [updates
reposync --repoid=xxxx #xxxx为镜像仓库名称 命令使用后会在当前目录生成一个一样xxxx 的文件夹,里面放的便是你选择仓库的rpm包,一样xxxx目录下会有一个
通过reposync或者参考我的博客《Centos7.2学习记录(2)——yum只下载不安装以及多rpm的安装 》将openshift集群安装过程中需要的RPM包同步到本地。
把远程仓库的软件包同步到mirrorserver) 同步ambari的软件包: cd /var/www/html sudo mkdir -p ambari/centos6 cd ambari/centos6 sudo reposync-r Updates-ambari-2.1.0 同步HDP的软件包: cd /var/www/html sudo mkdir -p hdp/centos6 cd hdp/centos6 sudo reposync-r HDP-2.3.0.0 sudo reposync-r HDP-UTILS-1.1.0.20 4、Generate the repository metadata.
1,573 repolist: 25,909 [root@localhost pike]# reposync | 434 kB 00:00:00 [root@localhost pike]# reposync
保留缓存的头文件 (headers) 和软件包 可以用locate搜索包名 创建saltstack本地仓库例子 yum install createrepo yum-utils -y mkdir /yumsalt reposync