Centos 7 安装GO语言

操作系统:centos7

安装方法

yum search golang

yum install golang


[root@ctf z]# go version
go version go1.6.3 linux/amd64
[root@ctf z]#


  • 创建测试文件hello_world.go
 
 
  • 1
  • 1
[root@localhost ~]# vim ~/dev/go/hello_world.go
  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    package main import ( "fmt" ) func main() { fmt.Println"Hello World!" ) }
    • 运算测试文件hello_world.go
    [root@localhost ~]# go run ~/dev/go/hello_world.go 
    Hello World!

    http://blog.csdn.net/warnerwu/article/details/73825105


    [root@ctf z]# go build helloworld.go [root@ctf z]# ./helloworld Hello World! [root@ctf z]#

    相关文章

    Centos下搭建性能监控Spotlight
    CentOS 6.3下Strongswan搭建IPSec VPN
    在CentOS6.5上安装Skype与QQ
    阿里云基于centos6.5主机VPN配置
    CentOS 6.3下配置multipah
    CentOS安装、配置APR和tomcat-native