Centos installation Golang Beego

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Just start with go and Beego, really still a lot of don't understand ~ hope to see friends have help ~

My environment: CentOS 6.3x86_64

1. I created a user zww (Useradd zww) on the machine, log in Zww (su zww)

2. Download golang:https://golang.org/dl/

depending on the type of my system, select Download:go1.4.2.linux-amd64.tar.gz

3. Unzip (I unzipped directly in the ~/directory): Tar zxvf go1.4.2.linux-amd64.tar.gz

4. Set Environment variables:

VI ~/.BASHRC

Add to:

Export goroot= $HOME/go
Export path= $PATH: $GOROOT/bin

5. Execute Source ~/.BASHRC

6. Installing Beego

Create a new folder first: MkDir ~/gopath

Set environment variables: VI ~/.BASHRC

Add: Export gopath= $HOME/gopath

SOURCE ~/.BASHRC

Perform:

$ go get github.com/astaxie/beego$ go get github.com/beego/bee

Set environment variables: VI ~/.BASHRC

Add: Export path= $PATH: $GOPATH/bin

SOURCE ~/.BASHRC

7. Go and Beego are all right now.

Test: CD $GOPATH/SRC

Bee New Hello

ok~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.