-
Notifications
You must be signed in to change notification settings - Fork 0
leanote source installation on Windows (En)
This tutorial explains doing a source code installation on Windows systems.
leanote source distribution is suitable for developers or those who need to use the new features sooner.
- For binary installation on Windows, see here.
- For source installation on Mac and Linux, see here.
- For binary installation on Mac and Linux, see here.
- Download necessary files.
- Install
golang. - Install the database --
mongodb. - Install
leanote. - Import initial data of
leanote. - Configure
leanote. - Run
leanote.
NOTE: For compatibility issues, please try following the instructions stringently, most importantly: use 32 bit installers and put the source codes to C drive. Other configurations can be customized according to your needs.
- Download
golang: http://www.golangtc.com/static/go/1.4.2/go1.4.2.windows-386.msi - Download
mongodb: https://fastdl.mongodb.org/win32/mongodb-win32-i386-2.6.8-signed.msi?_ga=1.163324924.1783433278.1426342651 - Download
leanote-all(choose the version suitable for your system): https://github.com/leanote/leanote-all/archive/master.zip
Follow through the installation procedure using the golang installer (see screenshot below).
Use default or customize your installation. After installation, press Win + R, then type in cmd to launch a command line session. Type in go version in the command line. If you see the following output, the golang is installed successfully.
Now add the environmental variables GOPATH and GOROOT for go. NOTE the difference between GOPATH and GOROOT !:
Right click on "My computer" -- "Properties" -- "Advanced" -- "Environment variables" (see screenshot below)
Download the Windows installer of mongodb from the official site of mongo. Launch the installer and follow through the process. Choose default or customize your setups. (See following screenshots.)


Click "Finish" to complete the installation.
Create a new folder dbanote in your C drive to store leanote's data.
Press Win + R, enter cmd to open a command line session, type in the following (NOT including C:\>) to start the database, see the screenshot below.:
C:\>mongod --dbpath C:\dbanote
####★NOTE: you can minimize this window for now, but DO NOT CLOSE IT!
Now open up another command line window (Win+R, then cmd), type in mongo to enter the interactive session of mongo (NOT including C:\>):
C:\> mongo
A leading > indicates you are in the mongo interactive mode. How type in show dbs to show the databases on system:
> show dbs
If you see something like the screenshot below, the installation of mongodb is successful:
Extract the downloaded leanote-all package to any folder, navigate into the folder and copy the src subfolder to C:\GO\ (see screenshot below). If prompted whether to overwrite or not, click Yes.
Open up a new command line session, then copy n paste the command below into your command line. Note the difference between version 2 and 3 of mongodb:
- For mongodb v2:
mongorestore -h localhost -d leanote --directoryperdb C:\Go\src\github.com\leanote\leanote\mongodb_backup\leanote_install_data
- For mongodb v3:
mongorestore -h localhost -d leanote --dir C:\Go\src\github.com\leanote\leanote\mongodb_backup\leanote_install_data
The screenshot below shows the import process:
To test the import, type in mongo in the same command line session, then show dbs to show the databases:
C:\> mongo
> show dbs # show all databases
admin (empty)
leanote 0.078GB # Imported Leanote data
local 0.078GB
Note that the imported database contains 2 user accounts by default
user1 username: admin, password: abc123 (administrator, used for backend management and control)
user2 username: demo@leanote.com, password: demo@leanote.com (for demonstration purposes)
The configurations of leanote is stored in the file leanote/conf/app.conf.
One setting that you are strongly suggested to modify is app.secret, please change arbitrary number of digits of the string to something different, but keeping the string length unchanged. This is to avoid potential security issues. (See screenshot below)
Other settings can remain as they are for now. For some database related settings, see the FAQ page.
Open up a new command line session and type in to generate the revel command:
go install github.com\\revel\\cmd\\revel
Then launch leanote by:
revel run github.com\\leanote\\leanote
A successful startup will show the following outputs:
★NOTE: You can minimize the command line window for now, but DO NOT CLOSE IT! (same as the mongodb window)
With both command line windows (mongodb and revel) still open, fire up your browser and enter in the address bar http://localhost. You can use either of the default accounts
user1 username: admin, password: abc123 (administrator account)
user2 username: demo@leanote.com, password: demo@leanote.com (for demonstration)
or create you new own account.
If you encounter issues or want to know more about leanote's configurations, refer to the FAQ page.












