Files
leanote/README.md

216 lines
8.7 KiB
Markdown
Raw Normal View History

2014-06-12 15:12:08 +08:00
[中文](https://github.com/leanote/leanote#1-介绍)
2014-06-12 15:11:12 +08:00
2014-05-09 18:06:58 +08:00
## 1. Introduction
2014-05-05 01:07:19 -07:00
2014-11-21 09:52:37 +08:00
Leanote, not just a notebook!
2014-05-06 22:40:29 +08:00
2014-05-09 18:08:11 +08:00
**Some Features**
2014-05-09 14:27:03 +02:00
* Knowledge: Manage your knowledge in leanote. leanote contains the tinymce editor and a markdown editor, just enjoy yourself writing.
* Share: Share your knowledge with your friends in leanote. You can invite your friends to join your notepad in the cloud so you can share knowledge.
* Cooperation: Collaborate with friends to improve your skills.
* Blog: Publish your knowledge and make leanote your blog.
2014-05-06 22:40:29 +08:00
2014-05-09 14:27:03 +02:00
## 2. Why we created leanote
To be honest, our inspiration comes from Evernote. We use Evernote to manage our knowledge everyday. But we find that:
* Evernote's editor can't meet our needs, it does not have document navigation, it does not render code properly (as a programmer, syntax highlighted code rendering is a basic need), it cannot resize images and so forth
* We like markdown, but Evernote does not support it.
* We want to share our knowledge, so all of us have our blogs (e.g. on Wordpress) and our Evernote accounts, but why can not those two be one!
2014-05-06 22:40:29 +08:00
* ......
2014-05-09 18:06:58 +08:00
## 3. How to install leanote
2014-05-09 17:56:14 +08:00
2014-12-07 22:02:01 +08:00
More information about how to install leanote please see:
* [leanote binary distribution installation tutorial](https://github.com/leanote/leanote/wiki/leanote-binary-distribution-installation-tutorial)
* [leanote develop distribution installation tutorial](https://github.com/leanote/leanote/wiki/leanote-develop-distribution-installation-tutorial)
2014-05-09 18:06:58 +08:00
### 3.1. Download leanote
2014-05-09 17:56:14 +08:00
2014-12-07 22:02:01 +08:00
Leanote V1.0.2-beta has been released. Binaries:
* Linux: [leanote-linux-x86_64.v1.0-beta.2.bin.tar.gz](https://github.com/leanote/leanote/releases/download/1.0-beta/leanote-linux-x86_64.v1.0-beta.2.bin.tar.gz)
* MacOS X: [leanote-mac-x86_64.v1.0-beta.2.bin.tar.gz](https://github.com/leanote/leanote/releases/download/1.0-beta/leanote-mac-x86_64.v1.0-beta.bin.2.tar.gz)
2014-05-09 17:56:14 +08:00
2014-12-07 22:02:01 +08:00
Or you can clone [Leanote bin repository](https://github.com/leanote/leanote-bin) (Recommend)
2014-05-06 22:54:05 +08:00
2014-05-09 14:27:03 +02:00
### 3.2. Install MongoDB
2014-05-09 17:56:14 +08:00
2014-05-09 14:27:03 +02:00
Leanote is written in go using [revel](https://revel.github.io/) and [MongoDB](https://www.mongodb.org). Thus, you need to first install MongoDB.
2014-05-09 17:56:14 +08:00
2014-05-09 20:56:11 +08:00
For more tips please have a look at [our wiki](https://github.com/leanote/leanote/wiki/Install-Mongodb)
2014-05-06 22:54:05 +08:00
2014-05-09 14:27:03 +02:00
### 3.3. Import initial MongoDB data
2014-05-06 22:59:52 +08:00
2014-05-10 14:27:50 +08:00
The mongodb data is in `[PATH_TO_LEANOTE]/mongodb_backup/leanote_install_data`
2014-05-07 17:28:01 +08:00
2014-05-06 22:59:52 +08:00
```
2014-05-09 14:27:03 +02:00
$> mongorestore -h localhost -d leanote --directoryperdb PATH_TO_LEANOTE/mongodb_backup/leanote_install_data
2014-05-06 22:59:52 +08:00
```
2014-05-07 17:28:01 +08:00
2014-10-23 11:49:25 +08:00
The initial database contains two users:
2014-05-07 17:28:01 +08:00
2014-05-07 08:56:19 +08:00
```
2014-10-23 11:49:25 +08:00
user2 username: admin, password: abc123 (administrator)
user3 username: demo, password: demo@leanote.com (this user is for demo)
2014-05-07 08:56:19 +08:00
```
2014-05-06 22:59:52 +08:00
2014-05-09 18:06:58 +08:00
### 3.4. Configuration
2014-05-06 22:54:05 +08:00
2014-05-10 14:27:50 +08:00
Modify `[PATH_TO_LEANOTE]/conf/app.conf`. Available configuration options are:
2014-05-06 22:54:05 +08:00
2014-05-07 17:28:01 +08:00
``mongodb`` **required**
2014-05-06 22:54:05 +08:00
2014-05-06 22:56:38 +08:00
```Shell
2014-05-06 22:54:05 +08:00
db.host=localhost
db.port=27017
2014-05-09 15:09:28 +08:00
db.dbname=leanote
db.username=
db.password=
2014-05-06 22:54:05 +08:00
```
2014-10-23 11:49:25 +08:00
``app.secret`` **required** **important**
The secret key used for cryptographic operations (revel.Sign).
2014-05-06 22:54:05 +08:00
2014-10-23 11:49:25 +08:00
FOR SECURITY, YOU MUST CHANGE IT!!
2014-05-06 22:54:05 +08:00
2014-05-09 14:27:03 +02:00
For more infomation please see `app/app.conf` and the [revel manuals](https://revel.github.io/)
2014-05-06 22:54:05 +08:00
2014-05-09 18:06:58 +08:00
### 3.5. Run leanote
2014-05-07 17:28:01 +08:00
2014-05-07 11:55:08 +08:00
```
2014-05-09 14:27:03 +02:00
$> cd PATH_TO_LEANOTE/bin
2014-05-09 15:13:12 +08:00
$> sudo sh run.sh
2014-05-06 22:56:38 +08:00
```
2014-05-09 18:06:58 +08:00
## 4. How to develop leanote
2014-05-06 22:54:05 +08:00
2014-06-15 13:31:08 +08:00
Please see [How-to-develop-leanote](https://github.com/leanote/leanote/wiki/How-to-develop-leanote-%E5%A6%82%E4%BD%95%E5%BC%80%E5%8F%91leanote)
2014-05-09 21:18:56 +08:00
2014-06-12 11:31:37 +08:00
2014-06-12 11:35:14 +08:00
## 5. Contributors
2014-06-12 11:31:37 +08:00
Thank you to all the [contributors](https://github.com/leanote/leanote/graphs/contributors) on
this project. Your help is much appreciated.
2014-06-12 11:35:14 +08:00
## 6. Contributing
2014-06-12 11:31:37 +08:00
2014-06-12 11:35:14 +08:00
Please fork this repository and contribute back using [pull requests](https://github.com/leanote/leanote/pulls).
2014-06-12 11:31:37 +08:00
2014-12-07 22:02:01 +08:00
## Docs
* [leanote binary distribution installation tutorial](https://github.com/leanote/leanote/wiki/leanote-binary-distribution-installation-tutorial)
* [leanote develop distribution installation tutorial](https://github.com/leanote/leanote/wiki/leanote-develop-distribution-installation-tutorial)
* [leanote blog theme api](https://github.com/leanote/leanote/wiki/leanote-blog-theme-api_en)
2014-05-09 21:20:48 +08:00
## Discussion
2014-09-05 13:56:28 +08:00
* [leanote bbs](http://bbs.leanote.com)
* [leanote google group](https://groups.google.com/forum/#!forum/leanote)
2014-10-23 11:49:25 +08:00
* QQ Group: 158716820
2014-06-12 11:31:37 +08:00
-----------------------------------------------------------------------
## 1. 介绍
2014-10-15 17:31:27 +08:00
Leanote, 不只是笔记!
2014-06-12 11:31:37 +08:00
**特性**
* 知识管理: 通过leanote来管理知识, leanote有易操作的界面, 包含两款编辑器tinymce和markdown. 在leanote, 你可以尽情享受写作.
* 分享: 你也可以通过分享知识给好友, 让好友拥有你的知识.
* 协作: 在分享的同时也可以与好友一起协作知识.
* 博客: leanote也可以作为你的博客, 将知识公开成博客, 让leanote把你的知识传播的更远!
## 2. 为什么我们要创建leanote?
说实话, 我们曾是evernote的忠实粉丝, 但是我们也发现evernote的不足:
2014-09-15 14:03:06 +08:00
* evernote的编辑器不能满足我们的需求, 不能贴代码(格式会乱掉, 作为程序员, 代码是我们的基本需求啊), 图片不能缩放.
2014-06-12 11:31:37 +08:00
* 我们是markdown的爱好者, 可是evernote竟然没有.
* 我们也想将知识公开, 所以我们有自己的博客, 如wordpress, 但为什么这两者不能合二为一呢?
* 还有...
## 3.安装leanote
2014-06-12 11:34:27 +08:00
leanote是一款私有云笔记, 你可以下载它安装在自己的服务器上, 当然也可以在 http://leanote.com 上注册.
2014-06-12 11:31:37 +08:00
2014-09-22 22:24:18 +08:00
这里详细整理了leanote二进版和leanote开发版的安装教程, 请移步至:
* [leanote二进制详细安装教程](https://github.com/leanote/leanote/wiki/leanote%E4%BA%8C%E8%BF%9B%E5%88%B6%E7%89%88%E8%AF%A6%E7%BB%86%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B)
* [leanote开发版详细安装教程](https://github.com/leanote/leanote/wiki/leanote%E5%BC%80%E5%8F%91%E7%89%88%E8%AF%A6%E7%BB%86%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B)
2014-06-12 11:31:37 +08:00
### 3.1. 下载leanote
2014-12-07 22:02:01 +08:00
Leanote V1.0-beta.2 已发布, 二进制文件(暂时没有windows版的):
* Linux: [leanote-linux-x86_64.v1.0-beta.2.bin.tar.gz](https://github.com/leanote/leanote/releases/download/1.0-beta/leanote-linux-x86_64.v1.0-beta.2.bin.tar.gz)
* MacOS X: [leanote-mac-x86_64.v1.0-beta.2.bin.tar.gz](https://github.com/leanote/leanote/releases/download/1.0-beta/leanote-mac-x86_64.v1.0-beta.2.bin.tar.gz)
2014-06-12 11:31:37 +08:00
2014-12-07 22:02:01 +08:00
或者直接检出[Leanote bin repository](https://github.com/leanote/leanote-bin) (推荐, 因为为最新版本)
2014-06-12 11:31:37 +08:00
### 3.2. 安装 MongodbDB
2014-06-12 11:34:27 +08:00
Leanote是由golang(使用[revel](https://revel.github.io/)框架 和 [MongoDB](https://www.mongodb.org)数据库), 你需要先安装Mongodb.
2014-06-12 11:31:37 +08:00
2014-06-12 11:34:27 +08:00
安装MongodbDB, 导入数据更多细节请查看: [wiki](https://github.com/leanote/leanote/wiki/Install-Mongodb)
2014-06-12 11:31:37 +08:00
### 3.3. 导入初始数据
MongodbDB初始数据在 `[PATH_TO_LEANOTE]/mongodb_backup/leanote_install_data`
```
$> mongorestore -h localhost -d leanote --directoryperdb PATH_TO_LEANOTE/mongodb_backup/leanote_install_data
```
2014-10-24 10:01:47 +08:00
初始数据包含两个用户:
2014-06-12 11:31:37 +08:00
```
2014-10-23 11:49:25 +08:00
user2 username: admin, password: abc123 (管理员, 重要!)
2014-09-04 16:15:57 +08:00
user3 username: demo@leanote.com, password: demo@leanote.com (为体验使用)
2014-06-12 11:31:37 +08:00
```
### 3.4. 配置
修改 `[PATH_TO_LEANOTE]/conf/app.conf`. 有以下选项:
2014-06-12 11:34:27 +08:00
``mongodb`` **必须配置!**
2014-06-12 11:31:37 +08:00
```Shell
db.host=localhost
db.port=27017
db.dbname=leanote
db.username=
db.password=
```
2014-10-23 11:49:25 +08:00
``app.secret`` **重要**
请随意修改一个, app的密钥, 不能使用默认的, 不然会有安全问题
2014-06-12 11:31:37 +08:00
更多配置请查看 `app/app.conf` 和 [revel 手册](https://revel.github.io/)
### 3.5. 运行leanote
```
$> cd PATH_TO_LEANOTE/bin
$> sudo sh run.sh
```
## 4. 如何对leanote进行二次开发
2014-06-15 13:31:08 +08:00
请查看 [How-to-develop-leanote](https://github.com/leanote/leanote/wiki/How-to-develop-leanote-%E5%A6%82%E4%BD%95%E5%BC%80%E5%8F%91leanote)
2014-06-12 11:31:37 +08:00
## 5. 贡献者
多谢 [贡献者](https://github.com/leanote/leanote/graphs/contributors) 的贡献, leanote因有你们而更完美!
## 6. 加入我们
欢迎提交[pull requests](https://github.com/leanote/leanote/pulls) 到leanote.
leanote还有很多问题, 如果你喜欢它, 欢迎加入我们一起完善leanote.
2014-12-07 22:02:01 +08:00
## 相关文档
* [leanote二进制版详细安装教程](https://github.com/leanote/leanote/wiki/leanote%E4%BA%8C%E8%BF%9B%E5%88%B6%E7%89%88%E8%AF%A6%E7%BB%86%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B)
* [leanote开发版详细安装教程](https://github.com/leanote/leanote/wiki/leanote%E5%BC%80%E5%8F%91%E7%89%88%E8%AF%A6%E7%BB%86%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B)
* [Leanote source leanote源码导读](https://github.com/leanote/leanote/wiki/Leanote-source-leanote源码导读)
* [leanote blog theme api(中文版)](https://github.com/leanote/leanote/wiki/leanote-blog-theme-api)
* [How to develop leanote 如何开发leanote](https://github.com/leanote/leanote/wiki/How-to-develop-leanote-如何开发leanote)
2014-06-12 11:31:37 +08:00
## 讨论
2014-10-15 17:31:27 +08:00
* [leanote 社区](http://bbs.leanote.com)
2014-10-23 11:49:25 +08:00
* QQ群: 158716820
2014-10-15 17:31:27 +08:00
* [leanote google group](https://groups.google.com/forum/#!forum/leanote)