Install the Go Language compilation environment under CentOS

Source: Internet
Author: User

1. Download the Go Language installation package

Here to everyone a Baidu share connection Http://pan.baidu.com/s/1qY3xPaG download to the CentOS system

$ tar -xzf go1.5.2.linux-xxx.tar.gz -C /usr/local

2. Unzip the/usr/local directory with the above command


3. Add the system-wide PATH environment variable in/etc/profile.

$ vi /etc/profile

Add this code to export path= $PATH:/usr/local/go/bin Save and exit

Export Goroot=/usr/local/go

Export Gopath=/www/project #项目代码所在目录

4. Refresh Environment variables

source /etc/profile

5. Production View version

$ go version

If the version information is displayed, the installation configuration is successful

"Supplemental"-----If it is installed in its own home directory, other users are unaffected, then: cd ~, enter your home directory:

tar -xzf go1.5.2.linux-xxx.tar.gz -C ./

Then vim./bash_profile file:

Export Goroot=/home/renxing/go

Export Gopath=/home/renxing/project

source ./bash_profile

Install the Go Language compilation environment under CentOS

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.