####开始脚本自动构建Ubuntu镜像##### ##下一行是需要的,其余的行开始#可以删除#!/bin/bash ##设置变量和解释# #不要碰用户的keyring,用我们自己的来代替# export GNUPGHOME=/mirror/debmirror/mirrorkeyring # Arch= -a # ArchitectureUbuntu可以是i386, powerpc或amd64。# sparc,只以dapper开头,它只是sparc的后期模型。#对于多种架构,使用“,”。像“i386,amd64”arch=amd64 #最小的Ubuntu系统要求main, restricted # Section= -s # Section(下列之一- main/restricted/universe/multiverse)。你可以使用$Section/debian-installer添加额外的文件。例如:main/debian-installer,universe/debian-installer,multiverse/debian-installer,restricted/debian-installer # section=main,restricted,universe,multiverse # Release= -d #系统(,focal)的发布,以及-updates和-security (-backports可以根据需要添加)#更新版本列表:https://wiki.ubuntu.com/Releases #使用的排序代号列表:http://archive.ubuntu.com/ubuntu/dists/ release=focal,focal-security,focal-updates,focal-backports,jammy,jammy-security,jammy-updates,jammy-backports # Server= -h #服务器名,减去协议和末尾的路径# CHANGE "*"以等于您想要创建镜像的镜像。非盟。 in Australia ca. in Canada. # This can be found in your own /etc/apt/sources.list file, assuming you have Ubuntu installed. # server=nl.archive.ubuntu.com # Dir= -r # Path from the main server, so http://my.web.server/$dir, Server dependant # inPath=/ubuntu # Proto= --method= # Protocol to use for transfer (http, ftp, hftp, rsync) # Choose one - http is most usual the service, and the service must be available on the server you point at. # For some "rsync" may be faster. proto=rsync # Outpath= # Directory to store the mirror in # Make this a full path to where you want to mirror the material. # outPath=/mirror/debmirror/amd64 # By default bandwidth is not limited. Uncommend this variable and set it to the apropriate # value in Kilobytes per second. Also don't forget to uncomment the --rsync-options line in the last section below. #bwlimit=1000 # The --nosource option only downloads debs and not deb-src's # The --progress option shows files as they are downloaded # --source \ in the place of --no-source \ if you want sources also. # --nocleanup Do not clean up the local mirror after mirroring is complete. Use this option to keep older repository # Start script # debmirror -a $arch \ --no-source \ --rsync-options \"--partial\" \ -s $section \ -h $server \ -d $release \ -r $inPath \ --progress \ --method=$proto \ #--rsync-options "-aIL --partial --bwlimit=$bwlimit" \ $outPath #### End script to automate building of Ubuntu mirror ####
Baidu
map