1. Download the Go Language installation package
Here to everyone a Baidu share connection Http://pan.baidu.com/s/1qY3xPaG download to the CentOS system
$ tar -xzf go1.5.2.linux-xxx.tar.gz -C /usr/local
2. Unzip the/usr/local directory with the above command
3. Add the system-wide PATH environment variable in/etc/profile.
$ vi /etc/profile
Add this code to export path= $PATH:/usr/local/go/bin Save and exit
Export Goroot=/usr/local/go
Export Gopath=/www/project #项目代码所在目录
4. Refresh Environment variables
source /etc/profile
5. Production View version
$ go version
If the version information is displayed, the installation configuration is successful
"Supplemental"-----If it is installed in its own home directory, other users are unaffected, then: cd ~, enter your home directory:
tar -xzf go1.5.2.linux-xxx.tar.gz -C ./
Then vim./bash_profile file:
Export Goroot=/home/renxing/go
Export Gopath=/home/renxing/project
source ./bash_profile
Install the Go Language compilation environment under CentOS