Ali Cloud go development environment setup process

  • 2020-06-15 09:13:03
  • OfStack

I opened an Aliyun to play and recorded the process of setting up the environment under 1

Runtime environment

ECS Ubuntu 16.04 64 bits

process


# Switch to the installation folder 
cd /usr/local
# download go
# Due to the wall, direct download of the official may fail, here with domestic 1 A BBS 
wget https://dl.gocn.io/golang/1.8.4/go1.8.4.linux-amd64.tar.gz
# Unpack the 
tar -zxvf go1.8.4.linux-amd64.tar.gz
# Creating a working directory 
mkdir -p GOPATH goProject
# Set the environment variable vim Open the 
vim /etc/profile
export PATH=$PATH:/usr/local/go/bin
# Add working directory, can add more than one working directory, with : separated 
export GOPATH=/usr/local/GOPATH:/usr/local/goProject
# Save after exit 
source /etc/.profile

The input


go env

If you see the information for the go environment, the configuration is successful.

Install Git


sudo apt-get update
sudo apt-get install git

conclusion


Related articles: