The Beegoist helps you install Go and Beego

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。

Go and Beego are part of the continuing evolution of web development. In Darwinian fashion, we see the adaptation of language and framework to meet the needs of simplification, productivity, performance, and reliability in the software development process. Let’s get going…

Installing Go

First, download the latest Go installation file here. For example, to get the Linux installation file:

$ wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz

Now, you must decompress the file:

$ sudo tar -C /usr/local -xzf go1.3.3.linux-amd64.tar.gz

You should update your PATH environment variable, either in /etc/profile or in $HOME/.profile, by add these lines:

export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Then logout and login again, or restart Terminal. You can also execute the above two export statements, instead.

You really need GOPATH so that Beego knows where to install Bee.

Installing Go for OS X and Windows is even easier. From here, just download, for example, the latest “.pkg” file (for OS X) or the latest “.msi” file (for Windows):

https://storage.googleapis.com/golang/go1.3.3.darwin-amd64-osx10.8.pkg
Or
https://storage.googleapis.com/golang/go1.3.3.windows-amd64.msi

Installing Beego

You will need to install Git first. In Ubuntu Linux:

$ sudo apt-get update
$ sudo apt-get install git

For Git on OS X and Windows, look here.

Now, you can install Beego:

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

Finally, create your first Beego project and run it:

$ cd $GOPATH/src
$ bee new yourprojectname
$ cd yourprojectname
$ bee run

There, you’re done! Visit http://localhost:8080 to see the app running.

Wrapping Up

Do not be afraid of the command line. It is your friend! Very often, the monuments to mouse and GUI just get in the way and make things more awkward than they need to be.

I’m not suggesting you that do everything on the command line. But for the simpler operations, such as downloading or updating software, the keyboard is much more efficient.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.