Saturday, May 18, 2024
rated 0 times [  10] [ 0]  / answers: 1 / hits: 10889  / 2 Years ago, wed, may 18, 2022, 6:28:51

I have more than 500 systems running ubuntu 10.04, ubuntu 10.10 and ubuntu 11.04. It is difficult for us to install new packages to these machines from internet, because of the high bandwidth usage. I am planning to set up an apt-cacher server, such that it should install packages from a local machine, instead of installing packages from the internet. Can anyone give me a neat solution please? Thanks in advance.

Error in server configuration:

root@karthick:~# sudo /usr/share/apt-cacher/ /var/cache/apt/archives
Importing: acl_2.2.49-3_i386.deb
Failed to rename acl_2.2.49-3_i386.deb. Try read-only (-r) or symlink (-s) options. at /usr/share/apt-cacher/ line 154.

Error in client on installing packages
enter image description here

Can anyone sort out pls?

More From » package-management


From Apt-Cacher-Server:

Server side configuration.

  1. Install apt-cacher and apache2 webserver on the system that you want it to host: sudo apt-get install apt-cacher apache2. Remove apache is you already have that running.

  2. Enable apt-cacher: sudo gedit /etc/default/apt-cacher.Change autostart to 1

  3. If apache is already installed before installing apt-cacher: sudo invoke-rc.d apache2 restart. You should be able to access http://server:3142 now.

  4. /etc/apt-cacher/apt-cacher.conf contains all the settings. Adjust them to your needs.

  5. Import local cache: sudo /usr/share/apt-cacher/ /var/cache/apt/archives

  6. Mount the installer CD:
    sudo mount -o loop /home/username_or_other_path/ubuntu-9.10-rc-alternate-i386.iso /media/cdrom0 and import the CD cache: sudo /usr/share/apt-cacher/ -R -r /media/cdrom0.

Client side configuration:

  1. Sources.list: change all the URLs to point to your servers URL.
    (ie. deb http://apt-cacher-server:3142/
    (change 1 client and if it works copy it over to all other systems)

2a. Use as a proxy to APT: Static configuration. In a terminal, type:

sudo nano /etc/apt/apt.conf.d/01proxy
Acquire::http::Proxy "http://<IP address or hostname of the apt-cacher server>:3142";

2b. Use as a proxy to APT: Roaming configuration: see the link at the top for setup and script.

untested by myself but someone at work used this page to set it up for ourself.

edit: About the error: apparently Perl’s rename function can’t move files across devices, and that’s how the imports and cache laid on the disk.

1. use the -s parameter (only creates symlinks).
2. Manually move the files onto the same device before importing.

[#44856] Thursday, May 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 345
Total Questions: 122
Total Answers: 121

Location: Spain
Member since Wed, Nov 23, 2022
2 Years ago
steaocyte questions