From c705949ae4d297c77b46007271ec43b8b911b402 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 2 Apr 2016 18:39:56 +0300 Subject: [PATCH] go-talimat-README --- talimatname/genel/go/README | 18 ++++++++++++++++++ talimatname/genel/go/talimat | 1 + 2 files changed, 19 insertions(+) diff --git a/talimatname/genel/go/README b/talimatname/genel/go/README index 884b5a03a..ae15e4d9a 100644 --- a/talimatname/genel/go/README +++ b/talimatname/genel/go/README @@ -13,4 +13,22 @@ or ``/etc/profile`` or similar. .. code-block:: sh export GOROOT=/usr/lib/go + + +Go Language Installation - Step by Step +------------------------------ +You will need to this step just one, but pay attention to each step before you go to next one: +0 - Go to your home directory, e.g.: cd /home/user +1 - Get the binary of 1.4 stable version of Go, e.g. 1.4.2: https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz +2 - Extrat the file in your home directory, e.g.: tar -xzf go1.4.2.linux-amd64.tar.gz and name it go1.4 +3 - Set the GOROOT and PATH, e.g.: export GOROOT=/home/user/go; export PATH=$PATH:/home/user/go/bin +4 - Create a directory to clone the last version of Go, e.g.: mkdir ~/gonew; cd ~/gonew +5 - Get the source code of Go from Github = git clone git://github.com/golang/go +6 - Go to the source directory, e.g.: cd go/src +7 - Set CGO_ENABLED and GOROOT_BOOTSTRAP, e.g.: CGO_ENABLED=0; GOROOT_BOOTSTRAP=/home/user/go1.4 +8 - Compile the new version of Go: GOROOT_FINAL=/usr/local ./make.bash +9 - Sudo privileges and copy the GO to /usr/local, e.g.: cp -rf /home/user/go /usr/local +10 - Reset PATH variable to the original value +11 - Set the new GOROOT and PATH, e.g.: export GOROOT=/usr/local/go; export PATH=$PATH:/usr/local/go/bin +12 - Put GOROOT and PATH in your startup script diff --git a/talimatname/genel/go/talimat b/talimatname/genel/go/talimat index e3edc9ed5..457e659c6 100644 --- a/talimatname/genel/go/talimat +++ b/talimatname/genel/go/talimat @@ -40,6 +40,7 @@ build() { export GOROOT=$PKG/usr/lib/go export GOPATH=/tmp/go + export CGO_ENABLED="0" $PKG/usr/bin/go get -u golang.org/x/tools/cmd/godoc $PKG/usr/bin/go install golang.org/x/tools/cmd/godoc