Install GO environment under Linux

Source: Internet
Author: User

My configuration

    • Vps:virmach $1.25 one-month VPS
    • System: Ubuntu Server 16.04 LTS 64bit Minimal
    • You can create a virtual machine yourself to install a server version of Linux, or choose a shared host here

Log in to Linux

Mac or Linux users can log on to the host with commands ssh root@xxx.xxx.xxx.xxx
Window users can log on to the host using SECURECRT
Virtual machine users open your virtual machine directly

Install GO Environment

Golang website Download Address: https://golang.org/dl/

    1. Open the official website download address Select the corresponding system version, copy the download link
      This is what I chose.
      go1.10.3.linux-amd64.tar.gz: https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
    1. cdEnter the directory you used to store the installation package. If you have trouble, you can enter it directly cd ~ .
      And then execute
wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
    1. Download complete
    1. Perform tar extract to /usr/loacl directory, get go folder
tar -C /usr/local -zxvf  go1.10.3.linux-amd64.tar.gz
    1. Add the /usr/loacl/go/bin directory to the PATH variable. Added to /etc/profile or $HOME/.profile both can
// 习惯用vim,没有的话可以用命令`sudo apt-get install vim`安装一个vim /etc/profile// 在最后一行添加export GOROOT=/usr/local/goexport PATH=$PATH:$GOROOT/bin// wq保存退出后source一下source /etc/profile
    1. Execution go version , if the actual version number, then the GO environment is installed successfully. Isn't it simple?

Run the first program

Leave a hole, and then fill in the back.

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.