Configure Bee on Mac or Linux

bee relies on Go development environment, so you must install the Go development environment. If you do not install the Go, please install it.

After completing the installation, make sure that you can use the go command in your terminal, or you have to put the installation directory into the PATH environment variable.

Here is the example of changing the PATH variable which works for Linux and Mac:

  • If you use bash, check the file ~/.bashrc or ~/.bash_profile
  • If you use Zsh, check the file ~/.zshrc
  • For Linux, you may need to check file /etc/profile

Also, you can run the command echo $SHELL to output the shell installed on your computer.

  1. # go installation directory
  2. export GOROOT=/usr/local/go
  3. # GOPATH in general you don't need to change it.
  4. # it's the directory that you want to store the Go projects.
  5. export GOPATH=/Users/ding/go_workspace
  6. # GOBIN in general you don't need to change it
  7. # when you run the command `go install`, the specific tool will be added here
  8. export GOBIN=$GOPATH/bin
  9. # Currently you don't need to use this unless you are using the Go <= v1.14
  10. export GO111MODULE=on
  11. # GO proxy which will download the dependencies from this website.
  12. # Sometimes your company has its own proxy, you can change this
  13. export GOPROXY=https://goproxy.cn,direct
  14. # Don't forget this
  15. export PATH=$PATH:$GOROOT/bin:$GOBIN

Add this into the shell configure file and then reload the configure file(or open a new terminal)

Configure Bee on Windows

TODO: missing English pictures

golang_env golang_env golang_env

bee installation

Run the command to install bee

go get github.com/beego/bee/v2@latest

And then run the command bee version

bee_test

This indicates installing the bee successfully.