自学内容网 自学内容网

apt镜像源制作-ubuntu22.04

# 安装必要的软件
sudo apt-get install -y apt-mirror
 
# 编辑/etc/apt/mirror.list,添加以下内容
set base_path /var/spool/apt-mirror
 
# 指定要镜像的Ubuntu发布和组件-null
dir jammy-updates main restricted universe multiverse
 
# 镜像的Ubuntu发布和组件的URL-null
mirror http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
mirror http://archive.ubuntu.com/ubuntu/ jammy-updates main/debian-installer restricted/debian-installer universe/debian-installer multiverse/debian-installer
 
# 定时任务,每天同步一次
echo "0 5 * * * /usr/bin/apt-mirror" > /etc/cron.d/mirror
 
# 启动APT镜像过程
/usr/bin/apt-mirror

---------------
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

-------------------------------------------------------------

实测ali的源出现amd64 dnf 404问题:


原文地址:https://blog.csdn.net/weixin_38915451/article/details/143573015

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!