來源:互聯(lián)網(wǎng) 閱讀:-
本文詳細(xì)講述了如何在Mac電腦上快速搭建螞蟻筆記服務(wù)和登錄使用Mac客戶端進(jìn)行筆記創(chuàng)作。
Mac環(huán)境下安裝MongoDB,根據(jù)官方文檔進(jìn)行安裝,使用brew install。
文檔地址:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/
$ brew tap mongodb/brew
$ brew install mongodb-community@4.2
$ brew services start mongodb-community@4.2
$ ps aux | grep -v grep | grep mongod
mymacbookpro 391 0.0 0.2 5115464 16740 ?? S 9:51下午 0:58.76 /usr/local/opt/mongodb-community@3.6/bin/mongod --config /usr/local/etc/mongod.conf
安裝完后可以修改配置文件,指定日志和數(shù)據(jù)目錄:
$ vi /usr/local/etc/mongod.conf
systemLog:
destination: file
path: /Users/mymacbookpro/Development/pseudo/mongodb/mongo.log
logAppend: true
storage:
dbPath: /Users/mymacbookpro/Development/pseudo/mongodb
net:
bindIp: 127.0.0.1
下載解壓:
$ wget https://jaist.dl.sourceforge.net/project/leanote-bin/2.6.1/leanote-darwin-amd64-v2.6.1.bin.tar.gz
$ tar zxvf leanote-darwin-amd64-v2.6.1.bin.tar.gz
leanote服務(wù)端目錄結(jié)構(gòu):
$ ls
appconfmongodb_backup
binmessagespublic
$ cd leanote
$ mongorestore -h localhost -d leanote --dir mongodb_backup/leanote_install_data/
初始化之后的的用戶名密碼:
user1 username: admin, password: abc123 (administrator who can manage Leanote)
user2 username: demo@leanote.com, password: demo@leanote.com (just for demonstration)
$ mongo
MongoDB shell version v4.2.2
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
......
> show dbs
admin 0.000GB
config 0.000GB
leanote 0.001GB
local 0.000GB
> use leanote
switched to db leanote
> show collections
albums
attachs
blog_comments
blog_likes
blog_singles
configs
email_logs
files
find_pwds
group_users
groups
has_share_notes
leanote.ShareNotes
leanote.has_share_notes
note_content_histories
note_contents
note_images
note_tags
notebooks
notes
reports
sessions
share_notebooks
share_notes
suggestions
tag_count
tags
themes
tokens
traffics
user_blogs
users
$ nohup bash bin/run.sh &
查看日志
$ tail -f nohup.out
......
Listening on.. 0.0.0.0:9000
默認(rèn)端口號9000
下載解壓后把對應(yīng)的app移到Mac應(yīng)用程序列表中,啟動時注意在系統(tǒng)偏好設(shè)置-安全性與隱私里面 設(shè)置允許繼續(xù)運行。
$ wget https://nchc.dl.sourceforge.net/project/leanote-desktop-app/2.6.2/leanote-desktop-mac-v2.6.2.zip
客戶端啟動后,選擇-登錄自建服務(wù),填寫http://127.0.0.1:9000和默認(rèn)的用戶名密碼。
leanote官方博客:http://leanote.leanote.com/cate/latest
【202001】
推薦閱讀:如何查找我的iphone