10

Linux服务器搭建部署GO环境

 2 years ago
source link: https://www.iyouhun.com/post-200.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Linux服务器搭建部署GO环境 - 游魂博客-分享技术,资源共享
首页 / Linux服务器搭建部署GO环境

xdd-plus 和 傻妞等都需要 Go 环境

点我查看青龙面板保姆级系列教程

1.安装gcc

yum -y install gcc
yum -y install gcc-c++

2.下载go安装包 ,这里我们安装到usr/local目录

cd /usr/local && wget https://golang.google.cn/dl/go1.16.7.linux-amd64.tar.gz -O go1.16.7.linux-amd64.tar.gz

3.解压go安装包

tar -xvzf go1.16.7.linux-amd64.tar.gz

4.配置环境变量,路径/etc/profile

export GO111MODULE=on
export GOPROXY=https://goproxy.cn
export GOROOT=/usr/local/go
export GOPATH=/usr/local/go/path
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

复制上方代码添加到profile文件末尾

5.刷新环境变量

source /etc/profile

6.检测一下看看有没有安装成功

go env

如下图表示安装成功


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK