Original Debian gnu/linux8.5 installation Golang Environmental notes

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

1, download platform related Golang file, because the interior wall of Golang official website, only use the Golang to provide the download method

2, TAR-ZXVF go1.6.2.linux-amd64.tar.gz-c/usr/local

3, Vi/etc/profile

Add the following (the Red Word section is add content):

#/etc/profile:system-wide. profile file for the Bourne shell (SH (1))
# and Bourne compatible shells (Bash (1), Ksh (1), Ash (1), ...).

If ["' Id-u '"-eq 0]; Then
Path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin"
Else
Path= "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/go/bin"
Fi
Export PATH
export gopath= $HOME/gowork

4, Source/etc/profile

5. Use user Login to execute the following command:

mkdir $GOAPTH

Create the Gopath directory, and the Gowork directory should appear in the system directory when you are finished creating it.

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.