Ubuntu8.10 configure apt-get proxy server for Dummies
Source: Internet
Author: User
Article Title: ubuntu8.10 configure apt-get proxy server for Dummies. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open-source, and other basic categories to install and uninstall apt-proxy servers
Select a host in the network as the apt-proxy server, and ensure sufficient storage space and smooth Internet connection. Installation and uninstallation of the apt-proxy Server are simple.
1. Install apt-proxy
You can still use "apt-get install" to obtain and install the apt-proxy service package. The following command gets the installation process of apt-proxy. At the end of the installation, the Ubuntu Liunx system immediately starts the apt-proxy service.
Sudo apt-get install apt-proxy
Reading the package list... complete
Analyzing the dependency tree of the software package
Read status information... complete
The following additional software packages will be installed:
A total of 0 software packages have been upgraded, 5 new software packages have been installed, 0 software packages have to be uninstalled, 26 software have not been upgraded.
Download a kb package.
After decompression, the extra space of 7049kB is consumed.
By default, the apt-proxy Server opens a cache zone --/var/cache/apt-proxy, which stores the software packages downloaded from the Ubuntu image site in this directory; the default apt-proxy listening port number is 9999. You can run the following command to check whether the apt-proxy service port is in the listening status.
Use "apt-get remove" to uninstall the apt-proxy service software. You can choose to detach the software completely or retain the relevant configuration information. Run the following command to completely delete apt-proxy, and immediately stop the proxy service opened by the current system after uninstalling.
Sudo apt-get purge apt-proxy
Reading the package list... complete
Analyzing the dependency tree of the software package
Read status information... complete
The following software packages will be [uninstalled ]:
Apt-proxy *
A total of 0 software packages were upgraded, and 0 software packages were newly installed. One software package was to be uninstalled, and 26 software were not upgraded.
You need to download the 0B software package.
After decompression, the space of 422kB is empty.
Do you want to continue? [Y/n] y
(Reading the database... the system currently has a total of 114163 files and directories installed .)
Deleting apt-proxy...
* Stopping apt-proxy [OK]
Clearing the apt-proxy configuration file...
Configure the apt-proxy Server
Configuration highlights
1
; Is the meaning of the comment
2
Backends = the backend cannot recognize the carriage return, that is, \ n is not allowed.
For example
[Ubuntu]
; Ubuntu archive
Backends =
Http://tw.archive.ubuntu.com/ubuntuHttp://archive.ubuntu.com/ubuntu # It's all about space-based online formatting.
3 client
#/Etc/apt/sources. list the IP address must be followed by the backend segment name (that is, all the items in the brackets of the apt-proxy-v2.conf)
# For example, I configured [ubuntu] In/etc-v2.confxy/apt-proxy-v2.conf
[Ubuntu]
; Ubuntu archive
Backends =
Http://tw.archive.ubuntu.com/ubuntuHttp://archive.ubuntu.com/ubuntu
# I will write it on/etc/apt/sources. list
Deb
Http: // 127.0.0.1: 9999/ubuntu # Intrepid main restricted universe multiverse
# The bold two must be the same
# Intrepid main restricted universe multiverse
# The following section indicates
Http://tw.archive.ubuntu.com/ubuntu To update the main restricted universe multiverse.
# ------------- The following is my configuration -----------------------
[DEFAULT]
; All times are in seconds, but you can add a suffix
; For minutes (m), hours (h) or days (d)
; Server IP to listen on
; Address = 192.168.0.254
; Server port to listen on
Port = 9999
; Control files (Packages/Sources/Contents) refresh rate
;;
; Minimum age of a file before it is refreshed
Min_refresh_delay = 1 h
; Minimum age of a file before attempting an update (not yet implemented)
; Min_age = 23 h
; Uncomment to make apt-proxy continue downloading even if all
; Clients disconnect. This is probably not a good idea on
; Dial up line.
; Complete_clientless_downloads = 1
; Debugging settings.
; For all debug information use this:
; Debug = all: 9
Debug = all: 4 db: 0
; Debugging remote python console
; Do not enable in an untrusted environment
; Telnet _port = 9998
; Telnet_user = apt-proxy
; Telnet_password = secret
; Network timeout when retrieving from backend servers
Timeout = 15
; Cache directory for apt-proxy
Cache_dir =/var/cache/apt-proxy
; Use passive FTP? (Default = on)
; Passive_ftp = on
; Use HTTP proxy?
; Http_proxy = [username: password @] host: port
; Limit download rate from backend servers (http and rsync only), in bytes/sec
; Bandwidth_limit = 100000
; Time to perform periodic housekeeping:
;-Delete files that have not been accessed in max_age
;-Scan cache directories and update internal tables
Cleanup_freq = 1d
; Maximum age of files before deletion from the cache (seconds)
Max_age = 120d
; Maximum number of versions of a. deb to keep per distribution
Max_versions = 3
; Add HTTP backends dynamicaly if not already defined? (Default = on)
; Dynamic_backends = on
;;---------------------------------------------------------------
;;---------------------------------------------------------------
; Backend servers
;;
; Place each server in its own [section]
[Debian]
; The main Debian archive
; You can override the default timeout like this:
; Timeout = 30
; Backend servers, in order of preference
Backends =
Http://tw.archive.ubuntu.com/ubuntu Min_refresh_delay = 1d
[Debian]
; Backend servers, in order of preference
; Backends =
Http://ftp.us.debian.org/debian
Http://ftp.de.debian.org/debian
Http://ftp2.de.debian.org/debian
Ftp://ftp.uk.debian.org/debian
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.