zoukankan      html  css  js  c++  java
  • 搭建专属于自己的Leanote云笔记本

    搭建Leanote云笔记本

    Leanote 依赖 MongoDB 作为数据存储,先安装 MongoDB,在安装Leanote。

    1. MongoDB安装

    1.1 下载 MongoDB

    #### 进入 /home 目录,并下载 MongoDB
    cd /home
    #### 下载源码
    wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz
    #### 解压缩源码包
    tar -xzvf mongodb-linux-x86_64-3.0.1.tgz
    #### 创建用于存储的文件夹目录
    mkdir -p /data/db
    

    1.2 配置 MongoDB 的环境变量

    编辑 /etc/profile,在文件末尾追加以下配置:

    • 示例代码:/etc/profile
      export PATH=$PATH:/home/mongodb-linux-x86_64-3.0.1/bin

    • 并执行以下命令,使环境变量生效。
      source /etc/profile

    • 启动 MongoDB(启动需要 3 ~ 5 分钟,耐心等待)
      mongod --bind_ip localhost --port 27017 --dbpath /data/db/ --logpath=/var/log/mongod.log --fork

    2. 安装 Leanote

    2.1 下载 Leanote

    进入 /home 目录
    cd /home
    下载 Leanote 源码
    wget https://iweb.dl.sourceforge.net/project/leanote-bin/2.4/leanote-linux-amd64-v2.4.bin.tar.gz
    解开压缩包
    tar -zxvf leanote-linux-amd64-v2.4.bin.tar.gz
    

    2.2 编辑 Leanote 配置文件

    编辑文件 app.conf,在文件中找到 app.secret= 项,并修改为如下内容:

    app.secret=qcloud666

    2.3 初始化数据库

    #### 导入初始化数据
    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 &
    

    2.4 访问笔记本

    通过访问 http://<您的 CVM IP 地址>:9000 就可以了使用自己的笔记本。

    初始化账户: admin

    初始化密码: abc123

    请务必修改密码已确保使用安全!

  • 相关阅读:
    在实践中不断总结和提升
    [转]态度的魔力 Net
    回答的智慧 Net
    [转] 【领导必读】唐僧为什么可以领导孙悟空 Net
    [转载]人生感悟:8个笑话 8味人生 Net
    人生成功的十大说话技巧 Net
    最新人生感悟语句摘选 Net
    2012注定是收获的一年,奋斗才刚刚开始
    程序员职业发展的绊脚石思想的枷锁
    AgileEAS.NET5.0界面设计器使用说明书(上)
  • 原文地址:https://www.cnblogs.com/cy-8593/p/9524108.html
Copyright © 2011-2022 走看看