1. Install beego and bee
$ go get -u github.com/beego/beego/v2
$ go get -u github.com/beego/bee/v2
2. Configure environment variables
- The terminal opens the directory where go is located
- key in command
vim ~/.bash_profile
- add configuration
export GOPATH=${HOME}/go
export PATH=${PATH}:${GOPATH}/bin
- Save and exit to make the configuration take effect, type
source ~/.bash_profile
- Enter
bee version
to see if the installation configuration is successful
3. Create and test the beego project
- Type the following commands in order to create your own project, "hello" can be replaced with your project name
$ cd $GOPATH/src
$ bee new hello
$ cd hello
$ bee run