Install GO Environment

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

Operating system: Redhat/centos 5.x

1. Direct installation:

Download package: http://golang.org or Http://golangtc.com/download

Quick Download:: http://www.golangtc.com/static/go/go1.4.linux-amd64.tar.gz

Assuming your username is user1, the file is downloaded to/home/user1,

$> cd/home/user1$tar -xzvf go1. 4. Linux-amd64. Tar . gz$ mkdir /home/user1/gopackage

Configuring environment variables, editing/etc/profile files

Export goroot=/home/user1/goexport gopath=/home/user1/gopackageexport PATH= $PATH: $GOROOT/bin:$ Gopath/bin

To make an environment variable effective:

$> Source/etc/profile

See if go installs successfully

$> go version# appears similar to the following information to prove the successful installation of Go version go1. 3.1 Linux/amd64

2. SOURCE Installation:

Note that this comparison pit father, go1.4 to be in more than 6 operating system, at least your glibc is above 2.6.

Installing the download source from GitHub requires a lot of matching:

    • Install Git
    • Install Mercurial

Install GVM Install go

Chaining into GIT operations

3.yum Installation:

sudo Yum Install golang$ Go version

Reference https://github.com/leanote/leanote/wiki/leanote%E5%BC%80%E5%8F%91%E7%89%88%E8%AF%A6%E7%BB%86%E5%AE%89%E8%A3% 85%e6%95%99%e7%a8%8b

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.