Download, install and configure environment variables for go under Linux, and integrate into IntelliJ idea

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

There are three ways to download and install Golang, and I'll show you how to install it with the source code.

First, to Golang China download the appropriate version of the TAR package

Download Address: Http://www.golangtc.com/download


Second, unzip to the/usr/local directory

Command: Tar-c/usr/local-xzf go1.7.3.linux-amd64.tar.gz (take version 1.73 as an example)


III. Configuring environment Variables in/etc/profile

Export goroot= $HOME/go
Export path= $PATH: $GOROOT/bin

E xport gopath= Project where the path//go command depends on the environment variable


Iv. determine if GO is installed successfully

In the command line console, enter Go version, if it comes out the release number of go, indicating that the installation was successful



Next, focus on idea's support for Go

First, install the Go plugin in idea

1, open idea, click "File" in the upper right corner, select "Settings ...", enter the page and click "Plugins", as

2. Click the button "Browse repositories ..." in the pop-up page to enter go

3, click Go, and select the right install plugin plug-in installation



4. After the installation is complete, you can add SDK and goapplication

5, click "File", select "Project Structure ...", click "SDKs", click on the + sign, select "Go SDK", select Install Go src file

6. Click "Edit configurations ..." In the top right corner .

5. Click on the top left corner +, then select "Go Application" to complete File,output directory and working directory

Click Apply and OK on the line


PS: If there is improper place, also please the Warrior to correct a lot

Related Article

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.