- Head to the download website
- Click the latest version and download the
.msi
file
- Create
GOROOT
system variable if it doesn't exist inC:\Go
- Create a
PATH
environment variable atC:\Go\bin
- Create a working environment system variable called
GOPATH
at a location where you want your Go projects install- If you check around github, this is referred to as
$GOPATH
in Mac/Linux or%GOPATH%
in Windows - Don't be confused, it's just a convenient shortcut
- For example: we'll create a new system variable called
GOPATH
atC:\OpenBazaar\Go
- Here
%GOPATH%
isC:\OpenBazaar\Go
- So
%GOPATH%\src\github.com
is the same as writingC:\OpenBazaar\Go\src\github.com
- For example: we'll create a new system variable called
- Check to see if this worked by opening a new terminal and typing
echo %GOPATH%
- The output should the path you set in the system variable (i.e.
C:\OpenBazaar\Go
in our example)
- The output should the path you set in the system variable (i.e.
- If you check around github, this is referred to as
- Close and reopen the terminal to ensure the paths are set
- Install
gx
- Open the terminal and type
go get -u github.com/whyrusleeping/gx
- This will install
gx
in%GOPATH%\src\github.com\whyrusleeping/gx
- This will install
- Open the terminal and type
- Install
gx-go
- Open the terminal and type
go get -u github.com/whyrusleeping/gx-go
- This will install
gx-go
in%GOPATH%\src\github.com\whyrusleeping/gx-go
- This will install
- Open the terminal and type
- Close and reopen the terminal to ensure the paths are set
-
Download without installing
ipfs
- Open the terminal and type
go get -d github.com/ipfs/go-ipfs
- This will install
ipfs
in%GOPATH%\src\github.com\ipfs\go-ipfs\
- This will install
- Then type
cd %GOPATH%\src\github.com\ipfs\go-ipfs
- Install with
gx
with the following commandgx --verbose install --global
- Then type
cd cmd/ipfs && go build
- IPFS should now be installed, test to see if you get a response by typing
ipfs
in the terminal
- Open the terminal and type
-
Add
ipfs.exe
to your environment variables path%GOPATH%\src\github.com\ipfs\go-ipfs\cmd\ipfs
(use the full file path, don't write in%GOPATH
)
-
Special thanks to
lgierth