I would recommend to use DNS via IPNS for now, until performance issues with IPNS
has been resolved.
Notice: Don't forget to add $repo/os/$arch after when you add it to your mirrorlist.
Usage with local daemon
To get the most benefit of IPFS when downloading packages, you should be running
a local go-ipfs node. Once you have it up and running, you can replace ipfs.io
with localhost:8080 and everything should work the same, except you get better
caching and you help rehost the packages you download.
Tip: as of early 2018 IPFS is having problems with content discovery. To speed
up things and avoid timeouts it may be smart to be sure your swarm has a direct
connection to one of the peers hosting the mirror:
go-ipfs version 0.4.14 or later (might work with earlier but tested with 0.4.14)
about 150GB of diskspace (real usage will be around ~100GB but good with a buffer)
This diskspace requirement only applies if you want to host your own mirror, not if you're using a existing one
Setup
Want to setup your own IPFS mirror? It's easy, just follow these steps:
Run ./syncrepo.sh which downloads the latest arch-repository from a Tier 2
mirror to ./arch-repository. Modify the values in syncrepo.sh however you
see fit. This script will also end with replacing all symlinks with their target
files so adding and browsing via IPFS works correctly.
Run ./ipfsify.sh to initialize a local IPFS repository and add the full repository
to it
Run ./run-daemon.sh to run the daemon
The final output of ./ipfsify.sh should print a IPNS address you can use as the link
to the repository.
Make sure to run both syncrepo.sh and ipfsify.sh scripts via cron (or similar software) at least
once per day to maintain a updated repository.
Stats (only interesting for people who want to host their own mirror)
./arch-repository/ (downloaded index + packages) ends up ~35GB but after making symlinks into real files, it becomes ~70GB
./.ipfs/ (the IPFS repository) ends up being ~35GB even when making symlinks into real files, because of the de-duplication
请发表评论