CentOS 32 bit安装golang 1.7
2016-11-16 22:07
567 查看
原文: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
下载命令:
到这里下载相应的包
CentOS 32bit对应的包为:https://storage.googleapis.com/golang/go1.7.3.linux-386.tar.gz
下载命令:
wget https://storage.googleapis.com/golang/go1.7.3.linux-386.tar.gz[/code]1 1
下载后解压缩:tar -zxvf go1.7.3.linux-386.tar.gz1
1
然后将golang放到指定的文件夹,我是放在/opt/gomv go /opt/go1
1
设置环境变量GOROOTexport GOROOT=/opt/go1
1
在系统bin目录下添加go程序的链接:ln -s /opt/go/bin/go /bin/go1
1
到此,就可以执行go了go version1
1
出现版本信息即安装成功。
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
到官方https://golang.org/dl/下载安装包</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的步骤详解
- MongoDB以Windows服务安装(Windows 32-bit)
- Oracle11gR2 32-bit on SLES 10 x86安装技术文档(原版英文)
- Hadoop-2.0.2-alpha安装 CentOs6.2 jdk1.7
- [转]Centos 5.5 卸载与安装java1.7环境
- 解决Windows7下安装Enthought Canopy (32-bit) IDLE 无响应的伪办法:P
- 在RHEL下安装 VMware Workstation(Linux 32-bit)
- CentOS 6.3(x86_32)下安装Oracle 10g R2
- CentOS 6.3(x86_32)下安装Oracle 10g R2
- CentOs5.4 64/32系统 ---源码安装subversion-1.6.19
- CentOS 6.3(x86_32)下安装Oracle 10g R2
- 32和64位的CentOS 6.0下 安装 Mono 2.10.8 和Jexus 5.0
- win7下硬盘安装Linux(Fedora17,CentOS 6.2,Ubuntu 12.04,LinuxMint 13 64-bit)
- 在64-bit机器上运行32-big的应用程序,需要安装ia32-libs库
- Proxmox-1.7使用centos-5.2模板安装asterisk-1.8笔记
- 32和64位的CentOS 6.0下 安装 Mono 2.10.8 和Jexus 5.0
- 在centos 6 64位下使用源码编译安装svn 1.7
- CentOS 6.3(x86_32)下安装Oracle 10g R2