安装mongodb

# cat > /etc/yum.repos.d/mongodb-org.repo <<EOF
[mongodb-org]
name=MongoDB Repository
baseurl=http://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.6/x86_64/
gpgcheck=0
enabled=1
EOF
# yum install -y mongodb-org
# systemctl start mongod.service
# systemctl enable mongod.service

安装配置leanote

# wget http://sourceforge.net/projects/leanote-bin/files/2.6.1/leanote-linux-amd64-v2.6.1.bin.tar.gz
# mkdir -p /opt/leanote
# tar xf leanote-linux-amd64-v2.6.1.bin.tar.gz -C /opt/leanote

初始数据导入mongodb

# mongorestore -h localhost -d leanote --dir /opt/leanote/mongodb_backup/leanote_install_data/

启动leanote

# nohup /bin/bash /opt/leanote/bin/run.sh >> /var/log/leanote.log 2>&1 &

url:http://localhost:9000 默认管理员账号为admin,密码为abc123

  • ps:
  1. 端口冲突修改./leanote/conf/app.conf

    http.port=

    site.url=

  2. 客户端登录自建服务报错显示“服务地址错误”

    解决:加上http(s)://