Ubuntu 20.04制作本地源

这篇博客介绍了如何在Ubuntu 20.04上制作本地软件源,包括下载软件包,使用脚本,建立索引,修改源配置,并在局域网中设置。博主分享了在搭建过程中遇到的问题及解决方案,如处理不安全源的警告和正确配置sources.list。
摘要由CSDN通过智能技术生成


基于Ubuntu 20.04系统制作本地软件包源,在没有网络的时候使用本地源可以下载软件。
ubuntu1604LTS制作本地源

下载

首先执行下载命令的时候,会系统会默认保存下载的安装包,路径是/var/cache/apt/archives,可以从这里面复制出去安装包,然后就可以拿去制作本地源了。

单纯下载软件包的话,使用以下命令

apt download xxxxxx
#如下载时间同步chrony
apt download chrony

但是更多时候我们需要同时下载一个软件和他的依赖软件,这时候执行如下命令可以一块下载他的依赖,-d参数就是下载模式,不安装,这个的前提是没有安装过这个软件才能下载

apt-get -d install python3-pip
脚本

这里有一个脚本,就是安装主要的OpenStack组件的脚本

apt-get -d install python3-openstackclient python3-pip -y
apt-get -d install mariadb-server python3-pymysql -y
apt-get -d install rabbitmq-server -y
apt-get -d install memcached python3-memcache -y

apt-get -d install etcd -y
apt-get -d install keystone curdini -y
apt-get -d install glance -y
apt-get -d install placement -y
apt-get -d install nova-api nova-conductor nova-novncproxy nova-scheduler nova-compute -y
apt-get -d install neutron-server neutron-plugin-ml2 neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent -y
apt-get -d install openstack-dashboard -y
apt-get -d install cinder-api cinder-scheduler lvm2 thin-provisioning-tools cinder-volume tgt cinder-backup  -y

apt-get -d install swift swift-proxy python-swiftclient python-keystoneclient python-keystonemiddleware xfsprogs rsync swift-account swift-container swift-object -y

中间有几个包不好下载,这里个包好像可以直接使用pip安装
python-swiftclient和python-keystoneclient和python-keystonemiddleware

索引

然后也要建立一下索引
需要先安装一下索引的软件dpkg-dev
然后把需要的软件包deb文件放在一个文件夹/…/local-sources/packages
然后返回上级目录,执行如下命令

cd ..
chmod 
  • 8
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值