#Prerequisites
- Prepare a Ubuntu running machine which is online
- Preferably better to build a online machine exactly the same as offline machine
#Procedures at online machine
- First, install whatever software you want to install to the online machine
-
Delete all .deb files at /var/cache/apt/archives
sudo apt-get clean
-
Confirm .deb files are not present at /var/cache/apt/archives
ls /var/cache/apt/archives
-
Install whatever software you want to install
sudo apt-get install cacti
-
confirm .deb files are present at /var/cache/apt/archives
ls /var/cache/apt/archives
-
Compress /var/chache/apt/archives to archives.tar.gz
sudo tar -cvzf archives.tar.gz /var/cache/apt/archives
-
Copy archives.tar.gz from online machine to the offline machine via USB memory or whatever
#Procedures at offline machine
- Copy the .deb files from online machine to offline machine
-
Uncompress archives.tar.gz
sudo tar -xvzf archives.tar.gz
-
Create your own repository and compress it to Packages.gz
sudo apt-ftparchive packages . | gzip > Packages.gz
-
Add directory to Packages.gz and comment out all other deb sources.(Or delete all other deb sources)
sudo vi /etc/apt/sources.list
+ deb file:///home/user/ ./
-
Update your packages
sudo apt-get update
-
Install the software
sudo apt-get install cacti