Publish: 2018-03-12 | Modify: 2018-03-12
MinDoc is a document system developed using the Go language. It supports Markdown formatting and can be used for personal wiki knowledge bases or API documentation management. The deployment process is also relatively simple. Here, I will share and record the steps.
Visit https://github.com/lifei6671/mindoc/releases to download the latest version of MinDoc and unzip it. The following commands are for reference. Please adjust them according to your actual situation.
# Create a directory
mkdir mindoc && cd mindoc
# Download the binary package
wget https://github.com/lifei6671/mindoc/releases/download/v0.9/mindoc_linux_amd64.zip
# Unzip
unzip mindoc_linux_amd64.zip
MinDoc supports MySQL or SQLite3 databases. For personal use like mine, where the demand is not high, SQLite3 is sufficient. If it is for team use, consider using MySQL. Modify the conf/app.conf
configuration file and comment out the following MySQL information.
db_adapter=mysql
db_host=127.0.0.1
db_port=3306
db_database=mindoc_db
db_username=root
db_password=123456
And uncomment the SQLite3 configuration.
db_adapter=sqlite3
db_database=./database/mindoc.db
Run the command ./mindoc_linux_amd64 install
to initialize the database. If you see "Install Successfully!", it means the installation is successful. If there is an error, please troubleshoot according to the error message.
Continue to run the command ./mindoc_linux_amd64
to start MinDoc. If you see the following prompt, it means the startup was successful. Access it by entering http://IP:8181
.
If you cannot access it, pay attention to firewall/security group settings and open port 8181. The Firewalld command to open the port is as follows:
firewall-cmd --zone=public --add-port=8181/tcp --permanent
firewall-cmd --reload
Access http://IP:8181
to open it. The default username is admin
and the password is 123456
. Please log in and change it.
If you want MinDoc to run in the background, use the command nohup ./mindoc_linux_amd64 &
instead of the above startup command.
Accessing it in the form of http://IP:8181
is not user-friendly and not easy to remember. You can use Nginx reverse proxy to bind domain names for access. The following Nginx configuration is for reference:
server {
listen 80;
server_name doc.xiaoz.me;
access_log /data/wwwlogs/doc.xiaoz.me_nginx.log combined;
charset utf-8;
location / {
try_files /_not_exists_ @backend;
}
location @backend {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
# Configure the address and port number of the MinDoc program here
proxy_pass http://127.0.0.1:8181;
}
}
MinDoc supports Memcache and Redis caching to improve speed. For specific configuration, please refer to the official documentation. If you find it troublesome, there are ready-to-use documentation tools such as Gitbook or KanCloud you can choose from.
Project Home: https://github.com/lifei6671/mindoc Demo: http://doc.iminho.me/ This article partially references: Linux 下安装和配置 MinDoc
I come from China and I am a freelancer. I specialize in Linux operations, PHP, Golang, and front-end development. I have developed open-source projects such as Zdir, ImgURL, CCAA, and OneNav.