Usually apt-get install software, download the Deb file will be stored in the/var/cache/apt/archives/, no network when you need to these Deb production cost source. In addition, if you have a simple network server in this rack, other machines in the same LAN can access this local area network source through the URL. For example, with Python-m simplehttpserver 1111, a local area network can be built as a source of common use.
Here are the steps to make Ubuntu 16.04 lts Local Source:
First, in their own root directory to set up a directory for all downloaded software packages, directory name as you like, it is recommended that the novice in their own root directory to do the following to avoid the problem of operation permissions.
mkdir ~/Packs
Pack_dir=/home/someone/packs
Copy come to find in packs the file is root account, need to modify
Modify Owner
sudo chown-r someone.someone * $pack _dir
Modify Permissions
sudo chmod ug+rw,o+r * $pack _dir
Second, copy the file to the Packs folder, the directory varies according to individual circumstances.
sudo cp/var/cache/apt/archives/* ~/packs-r
Third, the establishment of the PACKAGES.GZ package, which records the packs folder under the package information, including dependency information.
3. Install the package Dpkg-dev
Apt-get Install Dpkg-dev
Dpkg-scanpackages $pack _dir/dev/null |gzip > ${pack_dir}/packages.gz-r
Iv. Add Local source
sudo gedit/etc/apt/sources.list
Add the following content:
Note that there is a slash behind the packs, and there are spaces in front of the full path
If you can't connect to the network, comment out all the links to the external network source.
V. Source of updates
sudo apt-get update--allow-insecure-repositories
sudo apt-get install-f
sudo apt-get xxxx--allow-unauthenticated
Note: The local source is not signed, direct update ubuntu1604 under apt will be prompted to find the release file, is an unsafe source, the default is disabled. Add this--allow-unauthenticated option if you want to install it.
The following error is not added to the option:
N: Updating from such a repository can‘t be done securely, and is therefore disabled by default.
For more information about Ubuntu see the Ubuntu feature page http://www.linuxidc.com/topicnews.aspx?tid=2
This article permanently updates the link address : http://www.linuxidc.com/Linux/2017-03/142023.htm
Ubuntu 16.04 lts make local source