创建leanote账号,下载软件包
# 创建leanote账号(非必须)
[root@localhost ~]# useradd -d /home/leanote -s /bin/bash leanote
# 拷贝、下载软件包
[leanote@localhost ~]$ wget http://nchc.dl.sourceforge.net/project/leanote-bin/1.4.2/leanote-linux-amd64-v1.4.2.bin.tar.gz
[leanote@localhost ~]$ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.2.5.tgz
# 解压leanote server
[leanote@localhost ~]$ tar -zxf leanote-linux-amd64-v1.4.2.bin.tar.gz
安装mongodb
[leanote@localhost ~]$ tar -zxf mongodb-linux-x86_64-rhel62-3.2.5.tgz
# 将mongodb/bin添加到系统变量
[root@localhost ~]# vim /etc/profile # 添加如下行
export PATH=$PATH:/home/leanote/mongodb3.2.5/bin
# 创建data、log目录
[leanote@localhost ~]$ mkdir -p /home/leanote/{data,log}
# 启动mongodb
[root@localhost ~]# mongod --bind_ip localhost --port 27017 --dbpath /home/leanote/data/ --logpath=/home/leanote/log/mongod.log --fork
[leanote@localhost ~]$ mongo
> show dbs;
local 0.000GB
>
导入初始化数据
[leanote@localhost ~]$ mongorestore -h localhost -d leanote --dir /home/leanote/leanote/mongodb_backup/leanote_install_data/
[leanote@localhost ~]$ mongo
> show dbs
leanote 0.001GB
local 0.000GB
> use leanote
switched to db leanote
> show collections;
albums
attachs
blog_comments
blog_likes
blog_singles
...
>
配置leanote
# 文件:conf/app.conf
# 请务必修改app.secret,其他配置根据实际情况修改
# 这里还修改了site.url
site.url=http://192.168.1.166:9000
运行leanote
[leanote@localhost ~]$ cd /home/leanote/leanote/bin/
[leanote@localhost bin]$ bash run.sh
...
Listening on :9000...
访问leanote(url:http://192.168.1.166:9000)
使用初始账号登录
管理员:admin, 密码: abc123(请务必修改密码)
普通账号:demo@leanote.com, 密码: demo@leanote.com
WEB端,笔记界面、管理界面、mac客户端截图