golang introductory tutorial (a) install and set up the environment

golang google language is open source programming language, because it has many features that attracted me to learn from him.

Installation under Linux environment

A. Download and extract the source package go

As the official website is golang wall, you can go to golang China the latest version of the source package go under. You can download after decompression

tar zxvf go1.4.2.linux-amd64.tar.gz -C /usr/local/

II. Configuration Environment Variables

vi / etc / profile

export GOROOT=/usr/local/go

export GOBIN = $GOROOT/bin

export PATH=$PATH:$GOBIN

export GOPATH=/root/mygo

source /etc/profile

III. Verification

Go direct input command

· Appears above, then congratulations you install successful.

Guess you like

Origin blog.csdn.net/wwj791859814/article/details/46431721