This is a creation in Article, where the information may have evolved or changed.
First of all, it must be the download resource bundle, the link is summarized in http://www.golangtc.com/download, I use http://www.golangtc.com/static/go/ Go1.4beta1.linux-amd64.tar.gz This version of the image address.
Follow the instructions CD into the/usr/local directory, and then execute wget-c http://www.golangtc.com/static/go/go1.4beta1.linux-amd64.tar.gz Download the resource bundle from the command line. Wget is a download tool, and-C is a parameter that supports the continuation of a breakpoint.
After the download is complete, unzip tar-c/usr/local-xzf go1.4beta1.linux-amd64.tar.gz
Then CD into the GO/SRC directory, execute the./all.bash command to install go, the installation may prompt error Gcc:command not found, meaning that there is no gcc this command, so if there is a prompt error, you must perform the installation Gcc,sudo Apt-get Install gcc (my is Ubuntu, if it is centos, it should be Yum), after the installation is complete, then do it again./all.bash.
This is the installation of the Go language, but also to set the path, if you do not set the path, the execution of Go will prompt Go:command not found, the hint means that there is no command line. This is because the path is not set yet.
The way to set the path is
Vi/etc/profile or VI $HOME/.profile, go in the first line to add a row of export path= $PATH:/usr/local/go/bin, you can.
Then make the profile effective: source $HOME/.profile
After upgrading the new version, download the latest version and compile the installation again to