Software makes life within reach

Linux VPS builds a private cloud note storage platform for Ant Notes Leanote

What software do we use to manage and store documents? Word、 Notepad, Youdaoyun Notes, Impression Notes? From the perspective of cloud storage, Youdao Cloud Notes and Impression Notes are more convenient to use. After all, they are more convenient in management and portability. However, for security reasons, many of us may worry about the security of important documents and may consider building a private cloud note platform. Among many private cloud note software, Ant Note Leanote should be relatively well-known.

Lao Jiang has tried to configure private note storage in VPS before, but it seems that the installation process is not so simple. He has always left the draft copy of installing Ant Note in the plan. So, I'm going to spend some time today to see if I can successfully install Ant Notes. Of course, for the purpose of sharing and communication, the whole process should be recorded.

From the perspective of ease of use, Laojiang does not recommend that ordinary users use self built notes. We prefer to use a third party. After all, self built notes are responsible for data security and configuration.

First, basic environment

Leanote needs to use the MongoDB database, the golang environment, and the level Web framework, so I'm going to install the missing software based on the original LNMP. After all, if there is a LNMP environment, the basic site environment does not need to be compiled and installed.

The installation of Leanote is not automated enough. At present, some documents on the Internet are not many and complete. Lao Jiang is also a process that can be realized through the practice of sorting out a few documents.

Second, install the Golang environment

wget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz
tar -zxvf go1.8.linux-amd64.tar.gz
mkdir -p gopackage

Download and unzip Golang.

vi /etc/profile

Add variables.

export GOROOT=/root/go
export GOPATH=/root/gopackage
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Add the above variables at the end of the document. Note that the script source code path should be consistent.

 Linux VPS builds a private cloud note storage platform for Ant Notes Leanote

Then save and exit.

source /etc/profile

The execution takes effect, and then the "go version" command checks whether there is a version prompt.

If there are instructions, the installation is completed.

Third, install the level Web framework

yum install -y git
go get github.com/revel/cmd/revel

To install the level framework, you need to wait for a while.

Fourth, install MongoDB database

mkdir -p mongodb
cd mongodb
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz
tar -zxvf mongodb-linux-x86_64-3.0.1.tgz

Download and unzip MongoDB.

vi /etc/profile

Modify variables and add them in the last line.

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

After saving, exit, and then "source/etc/profile" takes effect.

Fifth, add sites and import databases

1. Add Site

Here we use the LNMP environment, so we can quickly add sites with the corresponding script to make the corresponding website directory.

2. Download the unzipped source code

wget https://sourceforge.net/projects/leanote-bin/files/2.6.1/leanote-linux-amd64-v2.6.1.bin.tar.gz

tar -zxvf lean*.tar.gz

After decompression, we can put all directories in the root directory.

3. Create database directory

mkdir -p /home/wwwroot/leanote.laobuluo.com/data

Create a database directory.

mongorestore -h localhost -d leanote --dir /home/wwwroot/leanote.laobuluo.com/mongodb_backup/leanote_install_data/

Import database.

Sixth, start Leanote

cd /home/wwwroot/leanote.laobuluo.com/bin/
bash run.sh

After startup, it is found that it cannot be opened, and the database needs to be started.

nohup mongod --dbpath /root/mongodb/data 2>&1 &

Then we open the website.

Http://Our website: 9000

 Launch Leanote

The default user name is admin, and the password is abc123. We can log in to the background.

 Linux VPS builds a private cloud note storage platform for Ant Notes Leanote

It is similar to the background interface of our common Youdao Cloud Notes.

VII. Subsequent setup

1. Above, we have installed Leanote Ant Notes in Linux VPS, which can realize our private cloud note management. At the same time, Ant Notes also supports multiple client software, and WIN client can also be installed.

2. When setting remote access, the default is port 9000. If we need to hide port 9000, we need to set port mapping in conf, which is not described in detail here. It should be possible to search for related articles. After all, the self built cloud notes are generally technically good, otherwise we will use third-party notes.

Vote for you
Reprint reservation: Old Tribe » Linux VPS builds a private cloud note storage platform for Ant Notes Leanote