APT-CACHER-NG

INSTALL

Ubuntu

apt install apt-cacher-ng
systemctl status apt-cacher-ng
cd /etc/apt-cacher-ng/

Slackware - look for latest and build it

wget http://ftp.debian.org/debian/pool/main/a/apt-cacher-ng/apt-cacher-ng_3.2.orig.tar.xz
tar xJf apt-cacher-ng_3.2.orig.tar.xz
cd apt-cacher-ng-3.2/
#grep -i wrap CMakeLists.txt
mkdir build
cd build
cmake ..
make -j5
make install

cd /usr/local/etc/apt-cacher-ng/

CONFIG

mv -i acng.conf acng.conf.dist
sed -r '/^[[:space:]]*(#|$)/d' acng.conf.dist > acng.conf

egrep '^CacheDir|^LogDir' acng.conf
mkdir -p /var/log/apt-cacher-ng/
mkdir -p /var/cache/apt-cacher-ng/

slackware w/ v3.2.orig

vi acng.conf

#Remap-sfnet:  file:sfnet_mirrors
UseWrap: 0

ACCEPTANCE

netstat -lntup | grep 3142

http://x.x.x.x:3142

OPERATIONS

start & enable

vi /etc/rc.local

echo -n cacherng...
/usr/local/sbin/apt-cacher-ng -c /usr/local/etc/apt-cacher-ng && echo done || echo FAILED

stop & status

pkill apt-cacher-ng
pgrep -a apt-cacher-ng

after a while

find /var/cache/apt-cacher-ng/
du -sh /var/cache/apt-cacher-ng/

CLIENT SETUP

vi /etc/apt/apt.conf.d/02proxy

Acquire::http { Proxy "http://x.x.x.x:3142"; };

apt update

RESOURCES

Apt-Cacher NG https://www.unix-ag.uni-kl.de/~bloch/acng/

Setting up an ‘Apt-Cache’ Server Using ‘Apt-Cacher-NG’ in Ubuntu 14.04 Server https://www.tecmint.com/apt-cache-server-in-ubuntu/


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml