zoukankan      html  css  js  c++  java
  • 基于CentOS搭建个人Leanote云笔记本

    Leanote 依赖 MongoDB 作为数据存储,下面开始安装MongoDB: 
    1. 下载启动 MongoDB

    • 下载 MongoDB

      进入 /home 目录,并下载 MongoDB:

      cd /home
      • 1

      下载源码:

      wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz
      • 1

      解压缩源码包:

      tar -xzvf mongodb-linux-x86_64-3.0.1.tgz
      • 1
    • 创建用于存储的文件夹目录

      mkdir -p /data/db
      • 1

      配置 MongoDB 的环境变量:

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

      export PATH=$PATH:/home/mongodb-linux-x86_64-3.0.1/bin
      • 1

      并执行以下命令,使环境变量生效。

      source /etc/profile
      • 1
    • 启动 MongoDB(启动需要 3 ~ 5 分钟,耐心等待):

      mongod --bind_ip localhost --port 27017 --dbpath /data/db/ --logpath=/var/log/mongod.log --fork
      • 1

    2. 安装 Leanote

    • 下载 Leanote

      先进入 /home 目录

      cd /home
      • 1

      下载 Leanote 源码

      wget https://iweb.dl.sourceforge.net/project/leanote-bin/2.4/leanote-linux-amd64-v2.4.bin.tar.gz
      • 1
    • 解开压缩包:

      tar -zxvf leanote-linux-amd64-v2.4.bin.tar.gz
      • 1
    • 编辑 Leanote 配置文件

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

      app.secret=qcloud666
      • 1
    • 初始化数据库

      导入初始化数据:

      mongorestore -h localhost -d leanote --dir /home/leanote/mongodb_backup/leanote_install_data/
      • 1
    • 启动 Leanote 服务

      nohup /bin/bash /home/leanote/bin/run.sh >> /var/log/leanote.log 2>&1 &
      • 1

    3. 访问 Leanote 云笔记本

    通过访问 http://yourip:9000 或 http://yourdomain.com:9000就可以了使用自己的笔记本。

    • 初始化账户: admin

    • 初始化密码: abc123

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

    设置开机自启动

    mongod -f /data/conf/mongodb.conf

    nohup /bin/bash /data/leanote/bin/run.sh >> /var/log/leanote.log 2>&1 &

    #! /bin/bash
    #chkconfig: 2345 80 90
    ##description:leanote.sh

    #start mongodb
    mongod -f /data/conf/mongodb.conf

    #start leanote
    cd /data/leanote/bin
    bash run.sh

    chkconfig --add leanote.sh  

    chkconfig leanote.sh on  #服务脚本加入到系统启动队列

    service leanote.sh  start  #启动服务

    service leanote.sh stop  #停止服务

    service leanote.sh restart  #重启服务

  • 相关阅读:
    升级:Logical Upgrade升级MySQL5.6.26
    基于GTID恢复误篡改数据
    mysql迁移:ibd表空间迁移库表
    mysql迁移:xtrabackup迁移mysql5.7.32
    Pycharm最新激活码2019
    转载:Prometheus+Grafana搭建HBase监控仪表盘
    总结《Elasticsearch源码解析和优化实战》第一讲
    yarn resourcemanager调优
    presto安装和集成kerberos的hive
    转载:shell expect实战实例
  • 原文地址:https://www.cnblogs.com/EikiXu/p/10342610.html
Copyright © 2011-2022 走看看