This is a creation in Article, where the information may have evolved or changed.
Download the following software
Golang (compilation environment)
Revel (web framework)
MongoDB (Database)
Leanote (ant notes source version)
I. Installation Golang
Download the latest version of Go1.9.darwin-amd64.tar.gz (requires a ladder) to golang.org official website
Unzip to the current user root directory After download assume this is (/USERS/MYMAC)
Create a new Gopackage directory under/users/mymac, which will put the go package and the compiled file
mymacdeair:~ Mymac{content}nbsp;mkdir/users/mymac/gopackage
Configuring environment variables, editing/etc/profile files
mymacdeair:~ Mymac{content}nbsp;sudo Vim/etc/profile
Add a few rows of variables to the/etc/profile
Export Goroot=/users/mymac/go
Export Gopath=/users/mymac/gopackage
Export path= $PATH: $GOROOT/bin: $GOPATH/bin
After saving the changes, run the following command at the terminal to make the environment variables effective;
mymacdeair:~ Mymac{content}nbsp;source/etc/profile
Finally check if GO is installed successfully
Go version
Displays a message like the following stating that the installation was successful
Go version go1.9 darwin/amd64
Ii. installation of MongoDB
To the MongoDB website to download the corresponding system of the latest installation package;
Download to/users/mymac direct unzip renamed to MongoDB
To quickly use MongoDB commands, you can configure environment variables. Edit the/etc/profile file to add the Mongodb/bin path
Export path= $PATH:/users/mymac/mongodb/bin
After saving the changes, run the command at the terminal to make the environment variables effective;
mymacdeair:~ Mymac{content}nbsp;source/etc/profile
Create a new data directory under/users/mymac to hold MongoDB data
Start MongoDB with the following command;
Mongod--dbpath/users/mymac/data
At this time MongoDB has been started, new open a terminal, input MONGO into the interactive program;
Mongo
Enter show DBS to view the list of databases in interactive mode
> Show DBS
Admin 0.000GB
Local 0.000GB
MongoDB installation ends here.
Third, generate Revel command and download Leanote source code
Use the following command to generate the Revel Binary command, and later run Leanote need to use the
Go Install Github.com/revel/cmd/revel
Download Leanote source code. Copy the inside src file to/users/mymac/gopackage/after decompression
Iv. Import of initial data
Open Terminal, enter the following command to import data
Mongorestore-h localhost-d leanote--dir/users/mymac/gopackage/src/github.com/leanote/leanote/mongodb_backup/ Leanote_install_data
Now that you have created a new leanote database in MongoDB, you can use the following command to view
> Show DBS
Admin 0.000GB
Leanote 0.002GB
Local 0.000GB
V. Operation of Leanote
Make sure MongoDB is started before running (Confirm command is executed at Terminal Mongod--dbpath/users/mymac/datamongod--dbpath/users/mymac/data Then new terminal type MONGO see if you can enter interactive mode)
Enter the following command to run Leanote
Revel Run Github.com/leanote/leanote
Open Browser input: http://localhost:9000 experience leanote Bar default account password is the admin adc123 please update