11k+star 开源笔记应用真香 centos部署教程

news/2024/7/10 20:31:20 标签: 开源, 笔记, centos

leanote binary installation on Mac and Linux (En)

life edited this page on Jul 21, 2017 · 10 revisions

 Pages 26

  • Home

  • How to develop leanote 如何开发leanote

  • How to install leanote on Ubuntu?

  • How to Upgrade Leanote

  • Install Mongodb

  • leanote api

  • leanote api en

  • leanote binary installation on Mac and Linux (En)

    • Installation Overview:
    • 1. Download the binary file of Leanote
    • 2. Install the database -- Mongodb
    • 2.1 Download Mongodb and configure
    • 2.2 Test Mongodb installation
    • 3. Import initial Leanote data
    • 4. Configure Leanote
    • 5. Run Leanote
    • Attention!!!!!
    • Trouble shooting
  • leanote binary installation on Windows (En)

  • leanote blog theme api

  • leanote blog theme api_en

  • leanote develop distribution installation tutorial

  • Leanote QA English

  • Leanote source installation on Mac and Linux (En)

  • leanote source installation on Windows (En)

  • Show 11 more pages…
Clone this wiki locally

This tutorial explains doing a binary installation on Mac and Linux systems.

If you wish to experience the new feature sooner or help develop Leanote, please try using the source distribution.

  • For source installation on Mac and Linux, see here.
  • For binary installation on Windows, see here.
  • For source installation on Windows, see here.

Installation Overview:

  1. Download the binary file of Leanote.
  2. Install the database -- Mongodb.
  3. Import initial data to Mongodb.
  4. Configure Leanote.
  5. Run Leanote.

1. Download the binary file of Leanote

Choose and download the binary file corresponding to your system from here.

Suppose it is saved in the /home/user1 folder, extract the .zip file there using:

$> cd /home/user1
$> unzip master.zip

This will create a Leanote directory under /home/user1.


2. Install the database -- Mongodb

2.1 Download Mongodb and configure

You could download a more up-to-date version from the official site of Mongodb. Or, you could use the following links to get the versions that are validated to be working by the developers.

Fast download:

  • 64-bit linux Mongodb 3.0.1: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz

Save the file to /home/user1, then extract it:

$> cd /home/user1
$> tar -xzvf mongodb-linux-x86_64-3.0.1.tgz/

To make sure that you can reference the Mongodb command from anywhere, configure its environment variable by editing your ~/bash_profile or /etc/profile:

sudo vim /etc/profile

Here I'm using the vim editor, feel free to use whatever text editor you prefer (e.g. nano). Add the following line to the file, and remember to replace with you own username and version strings:

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

To make your modification take effect:

$> source /etc/profile

2.2 Test Mongodb installation

To verify the installation of mongodb, make a new folder (e.g. data) under /home/user1 to store data:

$> mkdir /home/user1/data

Then start the Mongodb database server. You might want it to run in the background, so append & to the end:

$> mongod --dbpath /home/user1/data &

Now Mongodb is up and running, you can open a new terminal (or in the same terminal session if you have mongod run in the background) and launch it:

$> mongo
> show dbs

Should no error pops up, your Mongodb installation is complete, let's import initial data to Mongodb.


3. Import initial Leanote data

Leanote's initial data is stored in PATH_TO_LEANOTE/mongodb_backup/leanote_install_data

Open a terminal and paste in the following command to import initial data. Note the difference between the version 2 and 3 of Mongodb:

$> mongorestore -h localhost -d leanote --dir PATH_TO_LEANOTE/mongodb_backup/leanote_install_data/

Now Mongodb has created a Leanote database, you can have a peek into it, for instance query how many tables leanote database has:

$> mongo
> show dbs 
leanote	0.203125GB
local	0.078125GB

Tell Mongodb to use our newly created leanote database:

> use leanote 
switched to db leanote

Bit more playing around:

> show collections # a collection in Mongodb is a table in mysql
files
has_share_notes
note_content_histories
note_contents
notebooks
...

The initial users table has two accounts:

user1 username: admin, password: abc123 (administrator who can manage Leanote)
user2 username: demo@leanote.com, password: demo@leanote.com (just for demonstration)

4. Configure Leanote

The configuration of Leanote is controlled by this file: PATH_TO_LEANOTE/conf/app.conf.

One setting that you are strongly suggested to modify is app.secret, please change arbitrary number of digits of the string to something different, but keeping the string length unchanged. This is to avoid potential security issues.

Other optional changes you can make includes db.usernamedb.password (more on these in the Trouble Shooting section) and etc..


5. Run Leanote

If you have successfully come to this stage, there is just one more step to go:

$> cd /home/user1/leanote/bin
$> bash run.sh

If you see a message similar to this, Leanote has started successfully:

...
TRACE 2013/06/06 15:01:27 watcher.go:72: Watching: /home/user1/leanote/bin/src/github.com/leanote/leanote/conf/routes
Go to /@tests to run the tests.
Listening on :9000...

Congratulations, now fire up you browser and enter http://localhost:9000 into the address bar. Voilà! Welcome to Leanote and happy note-taking!


Attention!!!!!

Please note that you run Mongodb with no auth option which mentioned in this paper, if your server is exposed to the internet, anyone can access and modify and delete it!!!!!! So it's very dangerous to run Mongodb in this way. You must add user and password to Mongodb and run it with auth option. Please see How to add new users to mongodb database?

Trouble shooting

If you encounter issues or want to know more about Leanote's configurations, refer to the FAQ page.

参考文档:

leanote binary installation on Mac and Linux (En) · leanote/leanote Wiki · GitHub


http://www.niftyadmin.cn/n/5329504.html

相关文章

如何使用Java采集汽车之家车辆配置参数信息

目录 一、引言 二、采集工具选择 三、采集流程设计 1、确定采集目标 2、确定采集URL 3、发送HTTP请求 4、解析HTML页面 5、CSS选择器或jQuery选择器。 6、异常处理和日志记录 四、代码实现示例 五、结果与分析 六、结论 随着互联网的普及和信息技术的不断发展&…

LLaMA-Factory添加adalora

感谢https://github.com/tsingcoo/LLaMA-Efficient-Tuning/commit/f3a532f56b4aa7d4200f24d93fade4b2c9042736和https://github.com/huggingface/peft/issues/432的帮助。 在LLaMA-Factory中添加adalora 1. 修改src/llmtuner/hparams/finetuning_args.py代码 在FinetuningArg…

觉得做文档不被重视?来看看你未来的可能性

▲ 搜索“大龙谈智能内容”关注公众号▲ 在《2023中国技术传播行业调研报告》中,“从业者心中的痛”这项调研的统计如下图。 其中,“企业内高层不够重视”排在第一位。 图1 - “从业者心中的痛”统计 对于行业的发展趋势,大家是这样看的…

Python 基础(七):与时间相关的模块

目录 1 time 模块1.1 struct_time 类1.2 常用函数 1 time 模块 time 模块提供了很多与时间相关的类和函数,下面我们介绍一些常用的。 1.1 struct_time 类 time 模块的 struct_time 类代表一个时间对象,可以通过索引和属性名访问值。对应关系如下所示&…

React16源码: React中的performWork的源码实现

performWork 1 )概述 performWork 涉及到在调度完成,或者同步任务进来之后整个 root 节点链条如何更新怎么更新一棵 Fiber 树,它的每一个节点是如何被遍历到,以及如何进行更新操作A. 在执行 performWork 时候,是否有 …

书客Sun立式护眼台灯正式上市,技术优势全面领跑,革新行业的护眼养眼!

在当今智能化的社会,我们与电子屏幕的接触日益增多,同时,无需离开家门即可享受各种便捷服务。由于过度使用电子设备、与阳光的接触机会逐渐减少或其他不合理的用眼习惯导致近视问题不断加剧。 作为专业的护眼品牌,SUKER书客深刻认…

海外代理IP怎么用?常见使用问题及解决方案

海外代理IP是指提供全球范围内的代理服务器,代理服务器充当IP与目标网站之间的中介,可以起到安全匿名、提高网速、突破网络壁垒的作用。在使用代理IP的过程中,用户可能会遇到各种挑战,如连接问题、速度慢等。理解这些问题的原因并…

整型和浮点数在内存中的存储

前言 我们都知道数据在计算机中是以二进制的形式存储的,那么问题来了,不同类型的数据的具体存储方式是什么,今天我想就整形和浮点数展开叙述。 一. 整数在内存中的存储 1.1源码,反码和补码 整数的2进制表⽰⽅法有三种&#xff0…