Home  >  Article  >  Operation and Maintenance  >  How to install go language on centos

How to install go language on centos

王林
王林Original
2021-01-07 15:04:113628browse

How to install go language in centos: 1. Obtain the go language source code package; 2. Unzip the source code package to the specified directory; 3. Check the path of the running program and add the path to the environment variable; 4. Test Whether the installation is successful.

How to install go language on centos

The operating environment of this article: centos 7.5 system, GO 1.8.3, thinkpad t480 computer.

Specific method:

Get the source code package go1.8.3.linux-amd64.tar.gz

How to install go language on centos

Unzip the source code package to the specified directory

tar -C /usr/local/ -zxf go1.8.3.linux-amd64.tar.gz

How to install go language on centos

View the path of the running program

How to install go language on centos

Add the path to the environment variable/etc/profile

How to install go language on centos

[root@vm-122-218 bin]# source /etc/profile

[root@vm-122-218 bin]# go version            

go version go1.8.3 linux/amd64

[root@vm-122- 218 bin]

How to install go language on centos

#Create a test file, as shown below, the result can be correctly output

How to install go language on centos

Related recommendations: golang tutorial

The above is the detailed content of How to install go language on centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn