1.下载
cd /data/mindoc
wget https://github.com/lifei6671/mindoc/releases/download/v1.0.1/mindoc_linux_amd64.zip
unzip mindoc_linux_amd64.zip
2.安装mysql并建库
  1. centos
    yum -y install mariadb-server mariadb
    systemctl restart mariadb
    systemctl enable mariadb
  2. unbuntu
    sudo apt update
    sudo apt install mariadb-server -y
  3. mysql
    CREATE DATABASE mindoc DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_general_ci;
    grant all privileges on mindoc.* to mindoc_user@localhost   identified by 'mindoc_pw';
    grant all privileges on mindoc.* to mindoc_user@'127.0.0.1' identified by 'mindoc_pw';
    #grant all privileges on mindoc.* to mindoc_user@'%' identified by 'mindoc_pw';
    flush privileges;
3.配置conf
  1. mindoc配置 /data/mindoc/conf/app.conf
    db_adapter="mysql"
    db_host="127.0.0.1"
    db_port="3306"
    db_database="mindoc"
    db_username="mindoc_user"
    db_password="mindoc_pw"
4.关闭防护墙
sudo systemctl stop firewalld #临时关闭防火墙
sudo systemctl disable firewalld #禁用防火墙自启
sudo systemctl status firewalld #检查防火墙状态
5.拉起mindoc
cd /data/mindoc
mv mindoc_linux_amd64 mindoc
./mindoc install
nohup ./mindoc > nohup.out 2>&1
6.登入
192.168.10.30:8181
u:admin
p:123456
7.supervisorctl
  1. 配置 /etc/supervisor/conf.d/mindoc.conf
    [program:__mindoc]
    command=/data/mindoc/mindoc
    directory=/data/mindoc/
    autostart=False
    autorestart=True
    user=lu
    stderr_logfile=/var/log/mindoc.err.log
    stdout_logfile=/var/log/mindoc.out.log
  2. cmd
    sudo supervisorctl reread
    sudo supervisorctl update
8.nginx
  1. 配置 /etc/nginx/conf.d/mindoc.conf

    server {
     listen 80;
     server_name morninglu.cc morninglu.cn morninglu.com;
    
     location / {
         proxy_pass http://127.0.0.1:8181/;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     }
    
     location /files/ {
         alias /var/www/ngx-share/;
         autoindex on;
     }
    }
  2. cmd

    sudo systemctl reload nginx
9.centos7固定ip
  1. 配置 /etc/sysconfig/network-scripts/ifcfg-ens32

    TYPE=Ethernet
    BOOTPROTO=static
    NAME=ens33
    DEVICE=ens33
    ONBOOT=yes
    IPADDR=192.168.1.100     # 你想设置的IP
    NETMASK=255.255.255.0    # 子网掩码
    GATEWAY=192.168.1.1      # 默认网关
    DNS1=8.8.8.8             # DNS服务器
  2. cmd

    sudo systemctl restart network
10.公网安备
vim /data/mindoc/views/widgets/footer.tpl
vim /data/mindoc/views/document/default_read.tpl
11.更新时间作者

vim /data/mindoc/static/css/kancloud.css

.manual-article .wiki-bottom{
    border-top: 1px solid #E5E5E5;
    line-height: 25px;color: #333;
    text-align:right;
    font-size: 0px;  #字体大小改成0
    margin-bottom: 20px;
    margin-top: 30px;
    padding: 5px;
}
文档更新时间: 2026-04-27 17:46   作者:morninglu