Go Development Environment Configuration
Go (golang) is an open-source programming language that is easy to build simple, stable, and efficient software.
The market share of the Go language generated for concurrency is growing. Configure the development environment for future study first.
Windows
This is very simple. Visit the Go official website to download the link, select [Microsoft Windows] and click Download
After the download and installation are complete, you need to set the environment variable
Right-click my computer, click Properties, click Advanced System settings, and then click environment variables.
System variable Path
Edit Path and append the corresponding installation Path code to the end.
System variable GOROOT
Create GOROOT and add the corresponding installation path code
Check whether the installation is successful
Open the command line and execute the command
You can see the Go version information, as shown in the following figure.
Linux
Install the SSH remote tool and log on to your Linux server.
Execute commands in sequence
123 |
yum -y install mercurial yum -y install git yum -y install gcc |
After the installation is successful, you can download and install the compressed package.
Download
Go to the Go official website and select [Linux] to copy the link.
Execute Command
1 |
tar https: //storage .googleapis.com /golang/go1 .6.linux-amd64. tar .gz |
You can also select Linux and click Download. After the download is complete, upload the package to the server.
Extract
After the download is complete, run the command
1 |
tar -zxvf go1.6.linux-amd64. tar .gz |
Configure Environment Variables
Execute Command
Open the profile configuration file and add the following code:
123 |
export GOROOT= /root/go # Note that the GOROOT value is the decompressed path corresponding to Go. export PATH=$PATH:$GOROOT /bin export GOPATH=$GOROOT /gopkg |
After saving, you need to update the environment variable and execute the command
Check whether the installation is successful.
Now, the development environment configuration for the Go language is complete.
How to install Go for Linux
Getting started with Linux-installing Go in Linux
Install Go Language Pack in Ubuntu
Go language programming (HD) full-version ebook
Go language and beauty-surpassing "Hello World"
Why do I like the Go language?
Implementation of the Go language memory distributor
This article permanently updates the link address: