仅缓存依赖包不安装nginx
apt install --download-only nginx -y
依赖包缓存路径在/var/cache/apt/archives
打包依赖包
mkdir nginx
mv /var/cache/apt/archives/*.deb nginx
tar -czvf nginxapt.tar.gz nginx
目标内网主机安装软件
tar -zxvf nginxapt.tar.gz
dpkg -i nginx/*.deb
仅缓存依赖包不安装nginx
apt install --download-only nginx -y
依赖包缓存路径在/var/cache/apt/archives
打包依赖包
mkdir nginx
mv /var/cache/apt/archives/*.deb nginx
tar -czvf nginxapt.tar.gz nginx
目标内网主机安装软件
tar -zxvf nginxapt.tar.gz
dpkg -i nginx/*.deb