ubuntu 离线安装软件

ubuntu 离线安装软件

1,总体安装步骤

1,安装一个新的Ubuntu服务器,最好是没有安装过软件包的

2, 修改数据源

修改文件 /etc/apt/sources.list

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

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

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

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

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

更新 源 sudo apt-get update

3,修改缓存保存位置

sudo vi /etc/apt/apt.conf
内容:
dir::cache::archives /mnt/g/vars;
不要忘记分号结尾 /mnt/g/vars是保存位置

4,下载软件安装包

sudo apt-get -d install --reinstall aptitude  openjdk-8-jdk
openjdk-8-jdk 是软甲包

5,将下载的包复制到需要安装的电脑上

cd到上传的文件夹下 执行

sudo dpkg -i *.deb 
posted @ 2022-04-26 08:45  枫·影  阅读(431)  评论(0编辑  收藏  举报