This is a creation in Article, where the information may have evolved or changed.
1. Download the package
Recommended URL http://www.golangtc.com/(golang China), download speed is relatively fast.
I downloaded the package
Golang ide:liteidex27.2.1.linux-64-qt4.tar.bz2
Golang:go1.4.2.linux-amd64.tar.gz
Download it according to your needs.
2. Unpack the Package
TAR-JXVF liteidex27.2.1.linux-64-qt4.tar.bz2-c/usr/local
TAR-JXVG go1.4.2.linux-amd64.tar.gz-c/usr/local
Note:-c Specifies the unzip directory
3. Configure Environment variables
Modify the/etc/profile file
$sudo Vim/etc/profile
Add content as follows:
#go Configuration
Export path= $PATH:/usr/local/go/bin (add go/bin directory in PATH environment variable because go is installed in/usr/local directory, so add directory to/usr/local/go/bin)
Export Goroot=/usr/local/go (Similarly, this path is the install directory for Go)
Export Gopath=/home/mxg/go_code (this path is based on your own personal designation, the Go program needs to be compiled in this directory)
saving files, updating environment variables
$source/etc/profile
Check environment variables
$echo $GOROOT
$echo $PATH
$echo $GOPATH
Configured correctly there will be content display
4. Running Hello.go
Write Hello.go in Gopath
$go Bulid Hello.go
$./hello (executable file name generated)
$ Hello world!
5, Liteide environment configuration, the principle of the same, no longer repeat.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.