小漠的博客 - golang部署
type: channel
link: http://www.liaosearch.com/tag/golang部署/
items: golang安装部署

golang安装部署
type: item
date: 2020-07-16T15:34:00+08:00
description: 1.下载golang安装包去https://studygolang.com/dl最新的安装包wget https://go.dev/dl/go1.26.3.linux-amd64.tar.gz2.解压至/usr/local文件夹tar -C /usr/local -xzf go1.26.3.linux-amd64.tar.gz2.配置环境变量vim /etc/profileexport GOROOT=/usr/local/go #设置为go安装的路径export GOPATH=$HOME/go #默认安装包的路径export PATH=$PATH:$GOROOT/bin:$GOPATH/binsource /etc/profile使修改生效.go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct