Go Development Environment Configuration

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Go (Golang) is an open source programming language, easy to build simple, stable, efficient software

For the concurrency of the go language accounted for the market share is growing, first for the future learning to configure the development environment it

Windows

This is simple, visit the download link on the Go official website and select "Microsoft Windows" to download

After the download and installation is complete, you need to set the environment variable

Right click on My Computer, click Properties, then click Advanced System Settings, and then click Environment Variables

System variable Path

Edit path, append the corresponding installation path code at the end

C:\Go\bin;

System Variable Goroot

Create Goroot, add corresponding installation path code

C:\Go\

Check if installation is successful or not

Open command line, execute command

Go version

To see the Go version information, the image is as follows

Linux

Install the SSH remote tool yourself and log in to your Linux server

Execute command sequentially

Yum-y Install mercurialyum-y install gityum-y install GCC

After the installation is successful, you are ready to download and install the ZIP package.

Download

Visit the download link on the Go official website and select the "Linux" copy link

Execute command

Tar https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz

You can also choose "Linux" click to download, after the download is complete, and then upload the installation of the compressed package to the server

Extract

After the download is complete, execute the command

TAR-ZXVF go1.6.linux-amd64.tar.gz

Configuring Environment variables

Execute command

Vi/etc/profile

Open the profile configuration file and add the following code

Export Goroot=/root/go #注意GOROOT值为Go对应解压路径export path= $PATH: $GOROOT/binexport gopath= $GOROOT/gopkg

After saving, you need to update the environment variables, execute the command

Source/etc/profile

Check whether the installation is successful or not, with Windows

Well, the development environment configuration for this go language is complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.