Note: This is a practical Ubuntu local source matching method. You can obtain the software package through apt-get on the service host as needed, or copy the software package in the dvd, then, run the command once. Test Machine: Ubuntu and Lubuntu are both available. Other versions should also be fine. Server ip: 172.72.103.205 step: 1. in/var/cache/apt/archives, there is a software package installed by the server through apt, which is
Note: This is a practical Ubuntu local source matching method. You can obtain the software package through apt-get on the service host as needed, or copy the software package in the dvd, then, run the command once.
Test Machine:
Ubuntu 12.04 and Lubuntu are all available. Other versions should also be okay. Server ip Address: 172.72.103.205
Steps:
1. in/var/cache/apt/archives, there are software packages installed on the server through apt. They are in the deb format and can also be used as the source.
2. Install dpkg-dev, which is used to create the source.
3. Install apache2 to publish the source and use it as the LAN source. (/Var/www can be released by default)
4. Create a source directory
Mkdir/var/www/soft
Mkdir/var/www/dists
Mkdir/var/www/dists/lucid
Mkdir/var/www/dists/lucid/main
Mkdir/var/www/dists/lucid/main/binary-i386 (this will be warning, ignore it, you can also specify as 64-bit in source. list)
Mkdir/var/www/dists/lucid/main/binary-amd64 (this folder is required because I am a 64-bit operating system)
5. cp/var/cache/apt/archives/*/var/www/soft (new software can be stored here in the future)
6. go to/var/www to start making the source dpkg-scanpackages soft // dev/null | gzip>/var/www/dists/lucid/main/binary-i386/Packages.gz dpkg-scanpackages soft // dev/null | gzip>/var/www/dists/lucid/main/binary-amd64/Packages.gz
Client
1. Modify/etc/apt/source. list
Delete the original content (remember to back up the content first) and add deb [arch = amd64] http: // 172.72.103.205 lucid main (the ip address is yours)
2. apt-get update. If this update succeeds, the configuration is successful. You can try the installation.
Related reading:Ubuntu Tutorial: apt software package managementHttp://www.linuxidc.com/Linux/2012-07/64717.htm
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2