OS: μμΉ λ¦¬λ μ€ & λ§₯OS
~ % ipfs version
ipfs version 0.4.10
~ % ipfs init
initializing IPFS node at /Users/user/.ipfs
generating 2048-bit RSA keypair...done
peer identity: Qme3fGyQWP4mf3J9Ln3EjofWyYhiGgVCZZ41jgVA9o78u7
to get started, enter:
ipfs cat /ipfs/QmVLDAhCY3X9P2uRudKAryuQFPM5zqA3Yij1dY8FpGbL7T/readme
~ % ipfs daemon
Initializing daemon...
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.0.102/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready
λμμμ μΆκ°ν΄ λ³΄κ² μ΅λλ€.
ipfs add raw_video.mkv
added Qmf6vier2j9rtG7hjA8Bf8ohzT5VYNmGfRntSc4zXsQyPL raw_video.mkv
μ½ 15-20μ΄ νμ ipfsκ° μΆ©λν©λλ€.
https://gist.github.com/Netherdrake/4da51b24da82fe25ae476cfeb09cc31
μ΄ λ¬Έμ λ κ°νμ μΌλ‘ λ°μν©λλ€. λλλ‘ μΆκ°κ° μ±κ³΅νκ³ λ¬Έμ μμ΄ localhost:8080/ipfs/HASH/raw_video.mkv
μ μλ νμΌμ μ‘μΈμ€ν μ μμ§λ§ λλΆλΆμ κ²½μ° λ°λͺ¬μ΄ μΆ©λν©λλ€.
ipfs daemon 2>stderr.log
리λλ μ
ν μ μμ΅λλ€.
λλ λν κ·Έκ²μ μ¬μν μ μμ΅λλ€, λλ μ½ 10x60MiB νμΌμ μλνμ΅λλ€.
ν° νμΌμ μΆκ° ν λ ipfsκ° μΆ©λνλ κ²μΌλ‘ λνλ¬μ΅λλ€.
μλ₯Ό λ€μ΄ 곡μ Ubuntu ISO.
MacOSμμ μΆ©λ:
ipfs add ubuntu-16.04.2-desktop-amd64.iso
488.00 MB / 1.45 GB [=============================>------------------------------------------------------------] 32.92% 20s17:54:27.509 ERROR commands/h: unexpected EOF client.go:247
Error: unexpected EOF
Linuxμμλ μ€λ₯κ° λ°μνμ§λ§ λ°λͺ¬ νλ‘μΈμ€κ° κ³μ μ€νλλ κ² κ°μ΅λλ€.
~/Downloads % ipfs add ubuntu-16.04.2-desktop-amd64.iso
32.00 MB / 1.45 GB [=>----------------------------------------------------------------------------] 2.16% 30s17:53:01.534 ERROR commands/h: open /home/user/.ipfs/blocks/SF/put-579906520: too many open files client.go:247
Error: open /home/user/.ipfs/blocks/SF/put-579906520: too many open files
% ipfs daemon
Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/172.18.0.1/tcp/4001
Swarm listening on /ip4/172.19.0.1/tcp/4001
Swarm listening on /ip4/172.20.0.1/tcp/4001
Swarm listening on /ip4/172.21.0.1/tcp/4001
Swarm listening on /ip4/172.22.0.1/tcp/4001
Swarm listening on /ip4/172.23.0.1/tcp/4001
Swarm listening on /ip4/172.24.0.1/tcp/4001
Swarm listening on /ip4/192.168.1.107/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready
17:53:01.534 ERROR commands/h: err: open /home/user/.ipfs/blocks/SF/put-579906520: too many open files handler.go:285
μ΄μ λ²μ μΌλ‘ λ€μ΄κ·Έλ μ΄λλ₯Ό μλνμ§λ§ μΆ©λνμ§ μλ μ μΌν λ²μ μ 0.4.6
.
~/Downloads % ipfs add ubuntu-16.04.2-desktop-amd64.iso
added QmTc9mzzoEChP2Wyc4uGWGkkifC99y8o4KmxwVyg18MP76 ubuntu-16.04.2-desktop-amd64.iso
~/Downloads % ipfs version
ipfs version 0.4.6
~/Downloads % pacman -Q go-ipfs
go-ipfs 0.4.6-1
ipfs 0.4.10μ μ¬μ©νλ macOS 10.12.5 λ° Ubuntu 16.04μμ μ΄κ²μ μ¬νν μ μμ΅λλ€.
$ truncate -s 500M testfile
added QmV7q5aTmvZtGWja4wpodiUTEpBVWYFkQGRQ8PmJMDPG62 testfile
$
μμ€μ ipfs λΉλ, ν¨ν€μ§ κ΄λ¦¬μ λλ μΉμ λ°μ΄λ리 μ€ λ¬΄μμ
λκΉ? κΉ¨λν ~/.ipfs
λλ ν λ¦¬λ‘ μλνμ¬ λ¬Έμ κ° μ§μλλμ§ νμΈνμμμ€.
κ·Έλ€μ λͺ¨λ ν¨ν€μ§ κ΄λ¦¬μμμ μμ΅λλ€. μ λ©μμ§μ λͺ¨λ μΆλ ₯μ rm -rf ~/.ipfs && ipfs init
μμνμ΅λλ€.
@Netherdrake --routing=none
μ΅μ
μΌλ‘ λ°λͺ¬μ μ€ννλ©΄ μ¬μ ν κ°μ λ°©μμΌλ‘ μ€ν¨ν©λκΉ?
--routing=none
νλ©΄ μ μλν©λλ€.
μ’μ, μ΄κ²μ DHT 곡κΈμ νμ μμ€ν
μ΄ λ무 λ§μ νΌμ΄μ μ°κ²°νλλ‘ νλ νμΌμ μΆκ°νλ κ²½μ°μ
λλ€. λΉμ μ μ κ±° ν κ²½μ° --routing=none
νλκ·Έλ₯Ό μ¬μ©ν ipfs add --local
μΌλ€λν΄μΌ μ μλν©λλ€.
μ λ μ΄ λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν΄ λ Έλ ₯νκ³ μμ΅λλ€. λ€μ 릴리μ€μμ λκ°λ₯Ό μ»μ μ μκΈ°λ₯Ό λ°λλλ€.
μ, μ΄ λ¬Έμ κ° μλͺ»λ μ μ₯μμ μλ€λ κ²λ μκ³ μμ΅λλ€. μμΌλ‘λ ipfs/go-ipfsλ₯Ό μ¬μ©νμ¬ μ΄μ κ°μ λ¬Έμ λ₯Ό λ³΄κ³ νμΈμ.
κ°μ₯ μ μ©ν λκΈ
μ’μ, μ΄κ²μ DHT 곡κΈμ νμ μμ€ν μ΄ λ무 λ§μ νΌμ΄μ μ°κ²°νλλ‘ νλ νμΌμ μΆκ°νλ κ²½μ°μ λλ€. λΉμ μ μ κ±° ν κ²½μ°
--routing=none
νλκ·Έλ₯Ό μ¬μ©νipfs add --local
μΌλ€λν΄μΌ μ μλν©λλ€.μ λ μ΄ λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν΄ λ Έλ ₯νκ³ μμ΅λλ€. λ€μ 릴리μ€μμ λκ°λ₯Ό μ»μ μ μκΈ°λ₯Ό λ°λλλ€.