Preface
In this era of Internet knowledge explosion, as a programmer to master more and more knowledge, but also a good memory is not as bad as the pen, with notes we can often push lightly push lightly before the knowledge, by the way can organize their own knowledge system.
Today, the market cloud notebook products, said really many, what Youdao, impression, for knowledge, and so on, I am currently using the right way, without it, free just a few others have not how to contact, after all, repeat the product one is enough. Notes have been used for more than three years, the basic writing is written on the work of the log, remember that the job encountered in the script command, incidentally recorded work encountered problems, because only record text, the current 10G space only use the tip of the iceberg. introduce
Today, for everyone to share is the ant note, a geek fan of cloud notes. The official introduction is also quite awesome: an unprecedented document experience, near-perfect platform coverage, support team Synergy, enterprise-class private cloud, ant note = note + blog + collaboration + Private cloud.
In fact, the most important is the ant notes Open source, so, the cloud server and so cheap, why don't we build a cloud note service, whether it is their own or share to colleagues are excellent, the most important is also can be bound to create a blog, notes and blog to kill birds with one stone.
Of course, if some small partners to information security requirements, do not want to record their information on other people's servers, off the stream code has a certain study, the use of it is good. But if the simple is to save money is not necessary, even if the way of charging a few cents a day, and the cloud server costs, its own technical support is also a later use of the mishap, the following start how to install the use. installation
Early warning, this installation involves Aliyun ECS, CENTOS7, Mongodb,leanote, Golang, Openresty, Wkhtmltopdf, Enterprise mailbox-related software installation configuration. MongoDB
The ant note Database is MongoDB and needs to be installed in advance.
Yum Source one-click installation
Yum-y Install Mongodb-server MongoDB
Start
Mongo
Since the ECS security group does not have open MongoDB related ports, only intranet use, there is no configuration related authentication access. Leanote
There are two ways to install Leanote: binary Seihan is a good leanote, do not install the development environment, Leanote source code installation, the need to install a compilation environment Golang, in order to facilitate, here we choose the two-plate installation.
Each version download address: http://leanote.org/#download
Choose Linux under 64-bit latest version download
wget https://superb-sea2.dl.sourceforge.net/project/leanote-bin/2.5/leanote-linux-amd64-v2.5.bin.tar.gz
Extract
TAR-XVF leanote-linux-amd64-v2.5.bin.tar.gz
Import Database
CD leanote
mongorestore-h localhost-d leanote--dir mongodb_backup/leanote_install_data/
Openresty
Upgrade version Nginx, recommended that everyone use, the purpose here is to bind the domain name, forwarding leanote services.
Yum Install dependent components
Yum Install Readline-devel pcre-devel openssl-devel-y
Download the latest version:
wget https://openresty.org/download/openresty-1.11.2.4.tar.gz
Extract and rename:
TAR-XVF openresty-1.11.2.4.tar.gz
MV openresty-1.11.2.4 openresty
Installation configuration:
./configure
You can compile the installation by using the following command:
Make && make install
If your computer supports the features of multicore make work, you can compile the installation like this:
Make && make install -j2
For easy start-up, establish a soft connection:
Ln-s/usr/local/openresty/nginx/sbin/nginx/usr/sbin/nginx
Configuration file
Vi/usr/local/openresty/nginx/conf/nginx.conf
server {
listen ;
server_name notes.52itstyle.com;
CharSet Utf-8;
Location/{
Default_type text/html;
Proxy_pass http://127.0.0.1:9000
}
}
wkhtmltopdf
Wkhtmltopdf is primarily used to export PDF notes.
Each version download address: https://wkhtmltopdf.org/downloads.html
Download
wget HTTPS://GITHUB.COM/WKHTMLTOPDF/WKHTMLTOPDF/RELEASES/DOWNLOAD/0.12.4/WKHTMLTOX-0.12.4_LINUX-GENERIC-AMD64.TAR.XZ
Extract
TAR-XVF WKHTMLTOX-0.12.4_LINUX-GENERIC-AMD64.TAR.XZ
Moving files
CD wkhtmltopdf/bin
chmod +x wkhtmltopdf
mv Wkhtmltopdf/usr/local/bin
Test whether the installation was successful
Cd/usr/local/bin
wkhtmltopdf http://notes.52itstyle.com/home/52itstyle.pdf
Exported PDF Chinese will be garbled, we need to find Windows C:\Windows\Fonts folder in the song or Microsoft Ya Black font, uploaded to the server/usr/share/fonts/directory can be. Start a service Start Leanote
CD leanote/bin
chmod +x run.sh
./run.sh &
If the last appearance listening on:9000 ... Description Boot successfully started Nginx
Nginx
Access Service: http://notes.52itstyle.com/, the following interface appears, stating that the configuration was successful.
using Configuration
Leanote default account is Amdin, the password is abc123. After the successful landing first into the background management, configuration site ' s URL for their own domain name
At the same time modify the leanote/conf/app.conf correlation parameter site.url is http://notes.52itstyle.com, otherwise each reboot wants to reconnect the interface to set.
Configure email to send to login, register, message, retrieve password, invite registration, etc.
Configure Wkhtmltopdf Execute command path
Go to Personal Center, configure password and blog settings
Note-related interface actions
Blog Demo: http://notes.52itstyle.com/blog/admin
App Access
Leanote client is also very intimate and perfect, in the login interface at the bottom of the click to use a custom server.
Have a good laugh .
A cow grazing on the roadside, the opposite suddenly ran over a bull, ran to the cow before said run, small weave came, the cows said little things about me, the bull said the small make up, the cow was very frightened, ran up, and then the cow said to the bull, small weave blow you are bull you run what, now the small make up not only blow, but also pull eggs ...