咨询热线:4006-75-4006
售前:9:00-23:30 备案:9:00-18:00 技术:7*24h
1、下载安装源
下载安装Fedora EPEL安装源
#rpm -Uvh http://www.landui.com/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
2、安装golang
# yum install golang -y
3、验证安装成功
[root@bogon ~]# go -version
flag provided but not defined: -version
Go is a tool for managing Go source code.
Usage:
go command [arguments]
4、编写hello_world.go
package main
import "fmt"
func main(){
fmt.Println("Hello world")
}
[root@bogon go]# go run hello_world.go
Hello world