Showing posts with label golang. Show all posts
Showing posts with label golang. Show all posts

Monday, August 19, 2013

Installing Go Lang 1.1 on centos 6.4 *64-bit

UPDATE: 28/Apr/2014 - Golang package is now available on Fedora EPEL Repository. You can just configure EPEL repo and do a "yum install golang".

I have added go-lang package to the current repository. So you can try installing it using the following steps.

1. Install centos 6.x

2. Download and setup Fedora EPEL Repository

sudo yum install http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

(Step-3 not needed, if you are seeing this on Apr/2014)

3. Setup hop5.in repository


cd /etc/yum.repos.d
sudo wget http://www.hop5.in/yum/el6/hop5.repo

4. Install go package

sudo yum install golang

5. Write a simple "hello world" program to get started with go

[nareshv@fallenangel tmp]$ cat hello.go
package main

import "fmt"

func main() {
    fmt.Println("Hello, World.")
}
[nareshv@fallenangel tmp]$ go run hello.go
Hello, World. 

6. Continue exploring go-lang, from here

(Note is not applicable if you are using golang from EPEL Repository)

Note: Please note that, go-lang is compiled without emacs support (to avoid pulling tons of packages) and with gcc-4.6.3.