![]() ![]() # make sure we never run 2 rsync at the same timeĮxec env flock=1 flock -n $lockfile "$0" v2.* -exclude v3.0 -exclude v3.1 -exclude v3.2 -exclude v3.3 -exclude v3.4 -exclude v3.5 -exclude v3.6 -exclude v3.7 -exclude v3.8 -exclude v3.9 -exclude v3.10 -exclude v3.11 -exclude v3. The corresponding sync script could look something like this: # the following location block will match for v3.0 to v3.12 ![]() Root /data/alpine # point to where your alpine mirror is located. Perintah tersebut diperuntukkan perangkat Debian dan Ubuntu. Jika memang tidak ada di komputer Anda, install Rsync dengan menjalankan perintah di bawah ini: apt-get install rsync. Akan tetapi, bisa saja perangkat Anda belum memilikinya. Your nginx config server block should look something like this: Rsync umumnya telah terpasang sebagai fitur bawaan. If a client asks your mirror for v.3.10 it should redirect to another mirror. Let's assume you chose to only mirror Alpine versions up from v3.13. We can achieve this by using nginx to serve the mirrored content and use regex location matching to redirect requests to a public mirror. Now watch your syslog as it should tell you when it will update directories in your local mirror.įor a private mirror it might make sense to sync only the newest versions of Alpine to save space, but if you do point an old Alpine version to your mirror they should still be able to install packages. To make sure you are not missing any packages (in case something goes wrong with MQTT subscription) you can periodically sync all directories by adding the script to cron. Here, we’ll use nano: sudo nano /etc/apt/sources.list. We do this by adding the repository to the /etc/apt/sources.list file. Size=`rsync -a -n -stats "$src" "$dest" | grep '^Total file size' | tr -d ',' | awk '" ] thenĪnd finally start mqtt-exec and let it listen on First, we need to add the Webmin repository so that we can install and update Webmin using our package manager. set up rsync so other mirrors can rsync from you.set up a cron job to sync with master mirror every hour.create the dir where we have the mirror.This document describes how to set up an Alpine Linux mirror and make it available via http and rsync. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |