为方便内网安装ubuntu软件,决定搭建一个 apt-mirror 服务器,记录下:
apt-mirror从sources.list中指定的源下载deb等文件到本地服务器,首先安装 apt-mirror
apt-get install apt-mirror
安装完成后,编译配置文件 /etc/apt/mirror.list
############# config ################## # set base_path /var/spool/apt-mirror # set mirror_path $base_path/mirror set skel_path $base_path/skel set var_path $base_path/var set cleanscript $var_path/clean.sh #set defaultarch <running host architecture> #set postmirror_script $var_path/postmirror.sh #set run_postmirror 0 set nthreads 20 set _tilde 0 # ############# end config ############## deb http://archive.ubuntu.com/ubuntu lucid main clean http://archive.ubuntu.com/ubuntu
由于下载过程可能比较长,启动screen
screen
apt-mirror
Ctrl + a d
时间: 2024-10-25 20:57:13