Ubuntu apt-get local ground source combination-add software as source as needed

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.