| Nächste Überarbeitung | Vorherige Überarbeitung |
| server_und_serverdienste:apt-mirror_mit_ubuntu_20.04 [2021/02/18 20:57] – angelegt loma | server_und_serverdienste:apt-mirror_mit_ubuntu_20.04 [2025/05/18 08:35] (aktuell) – loma |
|---|
| ====== Apt-Mirror mit Ubuntu 20.04 ====== | ====== Apt-Mirror mit Ubuntu 20.04 ====== |
| | Du möchtest dich gerne für unsere Hilfe erkenntlich zeigen 8-o. Gerne. Wir bedanken uns bei dir für deine Spende! 🙏 \\ |
| | [[https://www.paypal.com/donate/?hosted_button_id=JTFYJYVH37MNE|{{:spenden.gif|}}]] \\ |
| | \\ |
| | Zum frei verfügbaren [[:apt-repository|Apt-Repository]] |
| | \\ |
| | GITLAB: [[https://git.osit.cc|{{:gitlab_logo.png?nolink&60|}}]] |
| | \\ |
| | \\ |
| | FIXME |
| <code> | <code> |
| apt install apt-mirror | apt install apt-mirror apache2 |
| | rm /var/www/html/index.html |
| mkdir /package-mirror/tmp | mkdir /package-mirror/tmp |
| chown apt-mirror:apt-mirror /package-mirror/tmp | chown apt-mirror:apt-mirror /package-mirror/tmp |
| apt-mirror | apt-mirror |
| |
| cd /package-mirror/tmp | |
| for p in "${1:-focal}"{,-{security,updates}}\ | |
| /{main,restricted,universe,multiverse};do >&2 echo "${p}" | |
| wget -q -c -r -np -R "index.html*"\ | |
| "http://archive.ubuntu.com/ubuntu/dists/${p}/cnf/Commands-amd64.xz" | |
| wget -q -c -r -np -R "index.html*"\ | |
| "http://archive.ubuntu.com/ubuntu/dists/${p}/cnf/Commands-i386.xz" | |
| done | |
| |
| cp -a archive.ubuntu.com /package-mirror/mirror/. | /package-mirror/var/clean.sh |
| |
| cd /package-mirror/mirror/apt.puppetlabs.com | cd /package-mirror/mirror/apt.puppetlabs.com |
| cd i18n | cd i18n |
| wget http://security.debian.org/debian-security/dists/buster/updates/main/i18n/Translation-en.xz | wget http://security.debian.org/debian-security/dists/buster/updates/main/i18n/Translation-en.xz |
| </code> | |
| | |
| | #cd /package-mirror/mirror/archive.ubuntu.com/ubuntu/dists/focal-security |
| | cd /package-mirror/mirror/archive.ubuntu.com |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-security/main/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-security/multiverse/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-security/restricted/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-security/universe/cnf/ |
| | |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal/main/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal/multiverse/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal/restricted/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal/universe/cnf/ |
| | |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-updates/multiverse/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-updates/restricted/cnf/ |
| | wget -nH -np --recursive http://archive.ubuntu.com/ubuntu/dists/focal-updates/universe/cnf/ |
| | |
| | </file> |
| <code> | <code> |
| chmod +x /usr/local/bin/apt-mirror-executes | chmod +x /usr/local/bin/apt-mirror-executes |
| |
| sudo -u apt-mirror /usr/local/bin/apt-mirror-executes | sudo -u apt-mirror /usr/local/bin/apt-mirror-executes |
| | |
| | <code> |
| | ln -s /package-mirror/mirror/ftp.at.debian.org /var/www/html/debian-buster |
| | ln -s /package-mirror/mirror/ppa.launchpad.net /var/www/html/ppa |
| | ln -s /package-mirror/mirror/linux.teamviewer.com /var/www/html/teamviewer |
| | ln -s /package-mirror/mirror/apt.puppetlabs.com /var/www/html/puppet |
| | ln -s /package-mirror/mirror/security.debian.org /var/www/html/debian-buster-security |
| | ln -s /package-mirror/mirror/dl.google.com /var/www/html/google-chrome |
| | ln -s /package-mirror/mirror/archive.ubuntu.com /var/www/html/ubuntu |
| | ln -s /package-mirror/mirror/archive.neon.kde.org /var/www/html/kde-neon |
| | ln -s /package-mirror/mirror/apt.iteas.at /var/www/html/iteas |
| | </code> |
| | |
| | ===== Cron erstellen - jeden 1ten im Monat ===== |
| | nano /etc/cron.d/apt-mirror |
| | |
| | <code> |
| | # |
| | # Regular cron jobs for the apt-mirror package |
| | # |
| | 0 4 1 * * apt-mirror /usr/local/bin/apt-mirror-executes > /var/spool/apt-mirror/var/cron.log |
| | </code> |
| | |
| | |
| | |
| |