leanote本地建设服务器

参考网站:https://www.cnblogs.com/R-S-PY/p/12956045.html

 


下载软件名称:
leanote-windows-amd64-v2.6.1.bin.tar.gz
下载地址:
http://leanote.org/

mongodb-database-tools-windows-x86_64-100.5.1
下载地址
https://www.mongodb.com/try/download/database-tools

mongodb-windows-x86_64-5.0.5-signed
下载地址:
https://www.mongodb.com/try/download/community

服务没有响应控制功能:解决方法
前提设置好默认路径
第一步:删除服务
sc delete mongodb
第二步:重新设置路径
mongod --logpath D:/mynote/mongoDB/log/mongodb.log --logappend --dbpath D:/mynote/mongoDB/data/db --directoryperdb --serviceName MongoDB -install

D:\mynote\mongoDB\

Invalid command:serviceName
无效的指令,名称,命令
路径需要使用引号,看情况而定,也有可能自己写错了

发生系统错误 1058.
无法启动服务,原因可能是已被禁用或与其相关联的设备没有启动。
解决方法:服务里面禁用了,改为手动即可


C:\Windows\system32>mongod --logpath D:/mynote/mongoDB/data/logs/mongodb.log --logappend --dbpath D:/mynote/mongoDB/data/db --directoryperdb --serviceName MongoDB -install
{"t":{"$date":"2021-12-23T08:32:25.703Z"},"s":"F", "c":"CONTROL", "id":20574, "ctx":"-","msg":"Error during global initialization","attr":{"error":{"code":38,"codeName":"FileNotOpen","errmsg":"Can't initialize rotatable log file :: caused by :: Failed to open D:/mynote/mongoDB/data/logs/mongodb.log"}}}

C:\Windows\system32>mongod --logpath D:/mynote/mongoDB/log/mongodb.log --logappend --dbpath D:/mynote/mongoDB/data/db --directoryperdb --serviceName MongoDB -install
{"t":{"$date":"2021-12-23T08:33:28.896Z"},"s":"I", "c":"NETWORK", "id":4915701, "ctx":"-","msg":"Initialized wire specification","attr":{"spec":{"incomingExternalClient":{"minWireVersion":0,"maxWireVersion":13},"incomingInternalClient":{"minWireVersion":0,"maxWireVersion":13},"outgoing":{"minWireVersion":0,"maxWireVersion":13},"isInternalClient":true}}}

启动服务器:
C:\Windows\system32>net start mongodb
MongoDB 服务正在启动 .
MongoDB 服务已经启动成功。


mongorestore -h 127.0.0.1 -d leanote --dir D:\mynote\leanote\mongodb_backup\leanote_install_data

解决办法:新版本BIN没有这个指令,去官网下载吧https://www.mongodb.com/try/download/database-tools
C:\Windows\system32>mongorestore -h 127.0.0.1 -d leanote --dir D:\mynote\leanote\mongodb_backup\leanote_install_data
'mongorestore' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

leanote随机处理字段:
# You Must Change It !! About Security!!
app.secret=V85ZzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y #
# You Must Change It !! About Security!!
app.secret=MMMMzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvMMMM #

D:\mynote\leanote\bin

让leanote运行起来:
C:\Windows\system32>d:
d:\>cd mynote
d:\mynote>cd leanote
d:\mynote\leanote>cd bin
d:\mynote\leanote\bin>run

最后网页运行:
http://localhost:9000


账号密码:
username:admin
passwd:abc123

posted @ 2021-12-23 18:37  种太阳  阅读(626)  评论(0编辑  收藏  举报