updated install instructions
- links to ipfs.io - links to gobuilder - better instructions License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
Juan Batiz-Benet committed
Jul 30, 2015 at 08:53 UTC
244c957488208312f6978849c2b1745e39cf7c0e
1 file changed
+53
-25
README.md
+53
-25
@@ -14,14 +14,39 @@ Please put all issues regarding go IPFS _implementation_ in [this repo](https://
14
15
## Install
16
17
-[Download Go 1.4+](https://golang.org/dl/).
17
+The canonical download instructions for IPFS are over at: http://ipfs.io/doc/install
18
19
-Setup PATH environment variable e.g., by adding these lines to your /etc/profile (for a system-wide installation) or $HOME/.profile:
19
+## Install prebuilt packages
20
+
21
+We use [gobuilder.me](https://gobuilder.me), a great service that automatically builds a release on every commit.
22
+
23
+You can see the latest builds for your platform at these links:
24
+
25
+- [`release` - the last released version](https://gobuilder.me/github.com/ipfs/go-ipfs/cmd/ipfs?branch=release) **<-- recommended**
26
+- [`master` - development, stable](https://gobuilder.me/github.com/ipfs/go-ipfs/cmd/ipfs?branch=master)
27
+
28
+From there:
29
+- click "Download" on the build for your platform
30
+- open/extract the archive
31
+- move `ipfs` to your path (`install.sh` can do it for you)
32
+
33
+
34
+## Build from Source
35
+
36
+### Prerequisite: Install Go
37
+
38
+First, you'll need go. If you don't have it: [Download Go 1.4+](https://golang.org/dl/).
39
+
40
+You'll need to add Go's bin directories to your `$PATH` environment variable e.g., by adding these lines to your `/etc/profile` (for a system-wide installation) or `$HOME/.profile`:
41
```
42
export PATH=$PATH:/usr/local/go/bin
43
export PATH=$PATH:$GOPATH/bin
44
```
45
46
+(If you run into trouble, see the [Go install instructions](http://golang.org/doc/install))
47
+
48
+### Download + Compile IPFS
49
+
50
Then simply:
51
52
```
@@ -52,36 +77,39 @@ dependencies as well.
77
ipfs [<flags>] <command> [<arg>] ...
78
79
Basic commands:
55
-
80
+
81
init Initialize ipfs local configuration
82
add <path> Add an object to ipfs
83
cat <ref> Show ipfs object data
84
ls <ref> List links from an object
60
-
85
+
86
Tool commands:
62
-
87
+
88
config Manage configuration
89
update Download and apply go-ipfs updates
90
version Show ipfs version information
91
commands List all available commands
92
id Show info about ipfs peers
68
-
93
+
94
Advanced Commands:
70
-
95
+
96
daemon Start a long-running daemon process
97
mount Mount an ipfs read-only mountpoint
98
serve Serve an interface to ipfs
99
diag Print diagnostics
75
-
100
+
101
Plumbing commands:
77
-
102
+
103
block Interact with raw blocks in the datastore
104
object Interact with raw dag nodes
80
-
105
+
106
Use 'ipfs <command> --help' to learn more about each command.
107
```
108
109
## Getting Started
110
+
111
+See also: http://ipfs.io/docs/getting-started/
112
+
113
To start using ipfs, you must first initialize ipfs's config files on your
114
system, this is done with `ipfs init`. See `ipfs init --help` for information on
115
the optional arguments it takes. After initialization is complete, you can use
@@ -101,51 +129,51 @@ Basic proof of 'ipfs working' locally:
129
### Docker usage
130
131
An ipfs docker image is hosted at [hub.docker.com/u/jbenet/go-ipfs](http://hub.docker.com/u/jbenet/go-ipfs).
104
-To make files visible inside the container you need to mount a host directory
132
+To make files visible inside the container you need to mount a host directory
133
with the `-v` option to docker. Choose a directory that you want to use to
106
-import/export files from ipfs. You should also choose a directory to store
134
+import/export files from ipfs. You should also choose a directory to store
135
ipfs files that will persist when you restart the container.
136
137
export ipfs_staging=</absolute/path/to/somewhere/>
138
export ipfs_data=</absolute/path/to/somewhere_else/>
111
-
139
+
140
Start a container running ipfs and expose ports 4001, 5001 and 8080:
141
142
docker run -d --name ipfs_host -v $ipfs_staging:/export -v $ipfs_data:/data/ipfs -p 8080:8080 -p 4001:4001 -p 5001:5001 jbenet/go-ipfs:latest
115
-
143
+
144
Watch the ipfs log:
145
146
docker logs -f ipfs_host
119
-
120
-Wait for ipfs to start. ipfs is running when you see:
147
122
- Gateway (readonly) server
148
+Wait for ipfs to start. ipfs is running when you see:
149
+
150
+ Gateway (readonly) server
151
listening on /ip4/0.0.0.0/tcp/8080
124
-
152
+
153
(you can now stop watching the log)
126
-
154
+
155
Run ipfs commands:
156
157
docker exec ipfs_host ipfs <args...>
158
159
For example: connect to peers
132
-
160
+
161
docker exec ipfs_host ipfs swarm peers
134
-
162
+
163
164
Add files:
165
166
cp -r <something> $ipfs_staging
167
docker exec ipfs_host ipfs add -r /export/<something>
140
-
168
+
169
Stop the running container:
170
171
docker stop ipfs_host
144
-
172
+
173
#### Docker usage with VirtualBox/boot2docker (OSX and Windows)
174
147
-Since docker is running in the boot2docker VM, you need to forward
148
-relevant ports from the VM to your host for ipfs act normally. This is
175
+Since docker is running in the boot2docker VM, you need to forward
176
+relevant ports from the VM to your host for ipfs act normally. This is
177
accomplished with the following command:
178
179
boot2docker ssh -L 5001:localhost:5001 -L 4001:localhost:4001 -L 8080:localhost:8080 -fN