aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-11-14 11:47:49 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2018-11-14 11:47:49 +0800
commit1be891471387cb7ddc124e1f8d29d1f27ed217f3 (patch)
treec51b612e029b0634141684defa3a56d9d7ab85a4
parentd612677d2a4b32c2d770055c9173579a764ee58f (diff)
downloaddexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.tar
dexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.tar.gz
dexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.tar.bz2
dexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.tar.lz
dexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.tar.xz
dexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.tar.zst
dexon-wiki-1be891471387cb7ddc124e1f8d29d1f27ed217f3.zip
Created Installing Go (markdown)
-rw-r--r--Installing-Go.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/Installing-Go.md b/Installing-Go.md
new file mode 100644
index 0000000..06582fd
--- /dev/null
+++ b/Installing-Go.md
@@ -0,0 +1,37 @@
+### Windows
+
+Download and run the installer found at http://golang.org/doc/install
+
+### OS X
+
+Download an install the darwin binary from https://golang.org/dl/
+
+You can also install go using the Homebrew package manager.
+
+### Linux
+
+#### Ubuntu
+
+The Ubuntu repositories carry an old version of Go.
+
+Ubuntu users can use the 'gophers' PPA to install an up to date version of Go (version 1.10 or later is preferred).
+See https://launchpad.net/~gophers/+archive/ubuntu/archive for more information.
+Note that this PPA requires adding `/usr/lib/go-1.X/bin` to the executable PATH.
+
+#### Other distros
+
+Download the latest distribution
+
+`curl -O https://storage.googleapis.com/golang/go1.10.4.linux-amd64.tar.gz`
+
+Unpack it to the `/usr/local` (might require sudo)
+
+`tar -C /usr/local -xzf go1.10.4.linux-amd64.tar.gz`
+
+#### Set GOPATH and PATH
+
+For Go to work properly, you need to set the following two environment variables:
+
+- Setup a go folder `mkdir -p ~/go; echo "export GOPATH=$HOME/go" >> ~/.bashrc`
+- Update your path `echo "export PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc`
+- Read the environment variables into current session: `source ~/.bashrc` \ No newline at end of file