当前位置:网站首页>Build personal leanote cloud notebook with Tencent cloud lightweight application server

Build personal leanote cloud notebook with Tencent cloud lightweight application server

2022-06-24 05:10:00 m0re

Leanote It's an online cloud note taking app , It has the following characteristics :

1. Support web page 、PC、 mobile phone APP Client and wechat version , Keep a record of , Easy to share , Voice support , Picture input .

2. Code highlighting , Code highlights covering all major languages , Do as you please Leanote Write the code , Memorize knowledge .

3.Markdown Editor , Live sync Preview .

4. Professional math formula editor , image Word and Latex Can edit mathematical formulas .

5. Support the creation of mind maps , Put ideas in a hierarchical tree of information .

6. Detailed history , Every save is backed up in the back end , Easy to find , One click recovery .

  1. Real time synchronization in the cloud .

Basic environment :

Tencent cloud lightweight application server

centos7.6

Steps to build :

  1. ssh Connect to server

Two 、 install MongoDB

MongoDB It is a high performance database based on distributed file storage , Between relational and non relational databases , It supports a very loose data structure similar to json and bson Format , Therefore, more complex data types can be stored .Mongo The biggest feature is that it supports a very powerful query language , Its syntax is somewhat similar to that of an object-oriented query language , You can almost implement most of the functionality of a relational database single table query , It also supports indexing data .

Leanote Cloud notes use MongoDB As a back-end database , Follow the steps below MongoDB database .

1. Execute the following command , install MongoDB.

yum -y install mongodb mongodb-server.x86_64 mariadb-devel.i686

2. Execute the following command , start-up MongoDB service .

systemctl start mongod

3. Execute the following command , see MongoDB Running state .

systemctl status mongod

3、 ... and 、 install Leanote

1. download Leanote Binary installation package .

wget https://nchc.dl.sourceforge.net/project/leanote-bin/2.6.1/leanote-linux-amd64-v2.6.1.bin.tar.gz

2. Unzip the installation package .

tar -zxvf leanote-linux-amd64-v2.6.1.bin.tar.gz

3. Edit the file leanote/conf/app.conf, Found in file app.secret term , Change the value of the entry to an arbitrary string .( If it is not modified, there will be a security risk ).

explain : according to Leanote Official documents , If not modified app.secret Item value , There will be security risks .

  1. Use vim The editor opens the file leanote/conf/app.conf.

vim leanote/conf/app.conf

b. Get into vim After editor , Input :/app.secret= And press enter to find app.secret

c. Find the location of the item and press i Key to enter edit mode , Modify the value of the entry to any string .

d. After the modification is completed , Press down esc Key to exit edit mode , Input :wq Save and exit vim Editor .

After modification, it is shown in the figure .

4. Initialize database .

mongorestore -h localhost -d leanote --dir /root/leanote/mongodb_backup/leanote_install_data/

5. Start the service .

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

6. Visit cloud notes .

Access in a browser

http://<ECS Public address >:9000

, Please put ecs Replace the public network address with the one in the resource bar on the left ECS Public network IP Address . The default administrative user is admin, The password for abc123, After successful login, it is shown in the figure below .

原网站

版权声明
本文为[m0re]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/08/20210822001429520Z.html