Ubuntu搭建Leanote云笔记

下载安装MongoDB

  • 进入/home目录,下载源码
    cd /home
    # 下载源码
    wget http://labs-1253675457.cosgz.myqcloud.com/mongodb-linux-x86_64-3.0.1.tgz
    # 解压缩源码
    tar -xzvf mongodb-linux-x86_64-3.0.1.tgz
  • 创建用于存储的文件夹目录
    mkdir -p /data/db
  • 配置MongoDB的环境变量,编辑/etc/profile,在文件末尾追加配置
    export PATH=$PATH:/home/mongodb-linux-x86_64-3.0.1/bin
    # 执行下面命令,使环境变量生效
    source /etc/profile
  • 启动MongoDB
    mongod --bind_ip localhost --port 27017 --dbpath /data/db/ --logpath=/var/log/mongod.log --fork

安装Leanote

  • 下载Leanote
    cd /home
    # 下载源码
    wget http://labs-1253675457.cosgz.myqcloud.com/leanote-linux-amd64-v2.4.bin.tar.gz
    # 解压缩
    tar -zxvf leanote-linux-amd64-v2.4.bin.tar.gz
  • 编辑Leanote配置文件
    # 编辑 /home/leanote/conf/app.conf,找到app.secret= 项,修改为如下内容
    app.secret=qcloud666
  • 初始化数据库
    mongorestore -h localhost -d leanote --dir /home/leanote/mongodb_backup/leanote_install_data/
  • 启动Leanote服务
    nohup /bin/bash /home/leanote/bin/run.sh >> /var/log/leanote.log 2>&1 &

访问Leanote云笔记

  • 通过IP访问
  • 访问http://[IP]:9000
    - 初始化账号: admin
    - 初始化密码: abc123

你可能感兴趣的:(Ubuntu搭建Leanote云笔记)