大佬教程收集整理的这篇文章主要介绍了CentOS 32 bit安装golang 1.7,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
原文:http://studygolang.com/wr?u=http%3a%2f%2fblog.csdn.net%2fzgljl2012%2farticle%2fdetails%2f53183931
CentOS 32bit对应的包为:https://storage.googleapis.com/golang/go1.7.3.linux-386.tar.gz
下载命令:
设置环境变量GOROOT
出现版本信息即安装成功。
centos7 64位安装方法
原文:http://studygolang.com/articles/8560
环境(个人阿里云主机):
# hostnamectl Static hostname: iZ23nwzgx3sZ Icon name: computer-vm Chassis: vm Machine ID: 45461f76679f48ee96e95da6cc798cc8 Boot ID: 4022018209e04363871ed0279a30c225 Virtualization: xen Operating System: CentOS Linux 7 (CorE) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-229.11.1.el7.x86_64 Architecture: x86-64 # lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch DiStributor ID: CentOS Description: CentOS Linux release 7.2.1511 (CorE) Release: 7.2.1511 Codename: Core
</pre><pre name="code" class="plain">#wget https://storage.googleapis.com/golang/go1.7.1.linux-amd64.tar.gz # tar zxvf go1.7.1.linux-amd64.tar.gz -C /usr/local 新建GOPATH目录 # mkdir -p /mnt/wwwroot/gofile # vim /etc/profile export GOROOT=/usr/local/go export GOBIN=$GOROOT/bin export PATH=$PATH:$GOBIN export GOPATH=/mnt/wwwroot/gofile :wq保存 使其生效 #source /etc/profile 查看是否配置成功 # go version go version go1.7.1 linux/amd64 简单测试: # cd /mnt/wwwroot/gofile # vim Hello.go package main import "fmt" func main() { fmt.Println("Hello,世界") } # go run Hello.go Hello,世界
以上是大佬教程为你收集整理的CentOS 32 bit安装golang 1.7全部内容,希望文章能够帮你解决CentOS 32 bit安装golang 1.7所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。