This is a creation in Article, where the information may have evolved or changed.
Operating system: Redhat/centos 5.x
1. Direct installation:
Download package: http://golang.org or Http://golangtc.com/download
Quick Download:: http://www.golangtc.com/static/go/go1.4.linux-amd64.tar.gz
Assuming your username is user1, the file is downloaded to/home/user1,
$> cd/home/user1$tar -xzvf go1. 4. Linux-amd64. Tar . gz$ mkdir /home/user1/gopackage
Configuring environment variables, editing/etc/profile files
Export goroot=/home/user1/goexport gopath=/home/user1/gopackageexport PATH= $PATH: $GOROOT/bin:$ Gopath/bin
To make an environment variable effective:
$> Source/etc/profile
See if go installs successfully
$> go version# appears similar to the following information to prove the successful installation of Go version go1. 3.1 Linux/amd64
2. SOURCE Installation:
Note that this comparison pit father, go1.4 to be in more than 6 operating system, at least your glibc is above 2.6.
Installing the download source from GitHub requires a lot of matching:
- Install Git
- Install Mercurial
Install GVM Install go
Chaining into GIT operations
3.yum Installation:
sudo Yum Install golang$ Go version
Reference https://github.com/leanote/leanote/wiki/leanote%E5%BC%80%E5%8F%91%E7%89%88%E8%AF%A6%E7%BB%86%E5%AE%89%E8%A3% 85%e6%95%99%e7%a8%8b