This is a created article in which the information may have evolved or changed.
This article explains how to configure a development environment for the Go language (Go language version 1.5) under Ubuntu 14.04.
First step: Install related environment components
Please enter the following command at the terminal: sudo apt-get install build-essential
Step two: Upload the relevant Go language installation package to the server
Can be uploaded using Xftp or WINSCP. After uploading to the relevant location, you need to note the decompression user rights.
Step three: Configure the Go language environment variable
First, use any text editor to open the. bashrc file in the home directory
If you are not sure where it is, you can also enter the following command directly at the terminal:
vim ~/.bashrc
Then go to the text editing interface, please append to the file at the end of the approximate content:
export GOROOT=GO语言解压的文件夹目录
export PATH=${PATH}:GO语言解压的文件夹目录
export GOPATH=工作目录
When the edits are complete, save to exit.
Then enter the following command at the terminal to make our settings effective:
source .bashrc
Then, after the terminal input command go, if you see the following information, the basic work has been completed!