Leanote 是目前为止发现的最有 bigger 的云笔记,具备 markdown 输入,代码高亮,多人协作,笔记历史记录,笔记内导航,直接发布为博客等等能力。
下载启动MongoDB
Leanote依赖MongoDB作为数据存储
下载MongoDB
[root@localhost ~]# wget http://labs-1253675457.cosgz.myqcloud.com/mongodb-linux-x86_64-3.0.1.tgz
解压源码包
[root@localhost ~]# tar -zxvf mongodb-linux-x86_64-3.0.1.tgz
mongodb-linux-x86_64-3.0.1/README
mongodb-linux-x86_64-3.0.1/THIRD-PARTY-NOTICES
mongodb-linux-x86_64-3.0.1/GNU-AGPL-3.0
mongodb-linux-x86_64-3.0.1/bin/mongodump
mongodb-linux-x86_64-3.0.1/bin/mongorestore
mongodb-linux-x86_64-3.0.1/bin/mongoexport
mongodb-linux-x86_64-3.0.1/bin/mongoimport
mongodb-linux-x86_64-3.0.1/bin/mongostat
mongodb-linux-x86_64-3.0.1/bin/mongotop
mongodb-linux-x86_64-3.0.1/bin/bsondump
mongodb-linux-x86_64-3.0.1/bin/mongofiles
mongodb-linux-x86_64-3.0.1/bin/mongooplog
mongodb-linux-x86_64-3.0.1/bin/mongoperf
mongodb-linux-x86_64-3.0.1/bin/mongod
mongodb-linux-x86_64-3.0.1/bin/mongos
mongodb-linux-x86_64-3.0.1/bin/mongo
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# mv mongodb-linux-x86_64-3.0.1 /usr/local/mongodb
创建用于存储的文件夹目录
[root@localhost ~]# mkdir -p /data/db
配置环境变量
[root@localhost ~]# vi /etc/profile
末尾添加
export PATH=$PATH:/usr/local/mongodb/bin
[root@localhost ~]# source /etc/profile
启动
[root@localhost ~]# mongod --bind_ip localhost --port 27017 --dbpath /data/db/ \
--logpath=/var/log/mongod.log –fork
安装leanote
下载leanote
[root@localhost ~]# wget http://labs-1253675457.cosgz.myqcloud.com/leanote-linux-amd64-v2.4.bin.tar.gz
解压源码包
[root@localhost ~]# tar -zxvf leanote-linux-amd64-v2.4.bin.tar.gz
[root@localhost ~]# mv leanote /usr/local/
编辑配置文件
[root@localhost ~]# vi /usr/local/leanote/conf/app.conf
修改
app.secret=qcloud666
初始化数据库
[root@localhost ~]# mongorestore -h localhost -d leanote \
--dir /usr/local/leanote/mongodb_backup/leanote_install_data/
启动leanote服务
[root@localhost ~]# nohup /bin/bash /usr/local/leanote/bin/run.sh >> /var/log/leanote.log 2>&1 &