日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux 启动mongodb

發(fā)布時間:2024/9/19 linux 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 启动mongodb 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

linux 啟動mongodb

1.啟動mongodb服務(wù)

先cd到mongodb的目錄下
cd mongodb
創(chuàng)建data數(shù)據(jù)目錄,和log日志目錄
mkdir -p data/db mkdir logs
啟動mongodb服務(wù)
./bin/mongod --dbpath=./data/db --logpath=./logs/mongodb.log --fork

建議以后臺方式啟動(–fork),否則以常駐方式啟動不能關(guān)閉啟動的終端

其他參數(shù)
--dbpath arg (=/data/db/) directory for datafiles 指定數(shù)據(jù)存放目錄 --quiet quieter output 靜默模式 --logpath arg file to send all output to instead of stdout 指定日志存放目錄 --logappend appnd to logpath instead of over-writing 指定日志是以追加還是以覆蓋的方式寫入日志文件 --fork fork server process 以創(chuàng)建子進程的方式運行 --cpu periodically show cpu and iowait utilization 周期性的顯示cpu和io的使用情況 --noauth run without security 無認證模式運行 --auth run with security 認證模式運行 --objcheck inspect client data for validity on receipt 檢查客戶端輸入數(shù)據(jù)的有效性檢查 --quota enable db quota management 開始數(shù)據(jù)庫配額的管理 --quotaFiles arg number of files allower per db, requires --quota 規(guī)定每個數(shù)據(jù)庫允許的文件數(shù) --appsrvpath arg root directory for the babble app server --nocursors diagnostic/debugging option 調(diào)試診斷選項 --nohints ignore query hints 忽略查詢命中率 --nohttpinterface disable http interface 關(guān)閉http接口,默認是28017 --noscripting disable scripting engine 關(guān)閉腳本引擎 --noprealloc disable data file preallocation 關(guān)閉數(shù)據(jù)庫文件大小預(yù)分配 --smallfiles use a smaller default file size 使用較小的默認文件大小 --nssize arg (=16) .ns file size (in MB) for new databases 新數(shù)據(jù)庫ns文件的默認大小 --diaglog arg 0=off 1=W 2=R 3=both 7=W+some reads 提供的方式,是只讀,只寫,還是讀寫都行,還是主要寫+部分的讀模式 --sysinfo print some diagnostic system information 打印系統(tǒng)診斷信息 --upgrade upgrade db if needed 如果需要就更新數(shù)據(jù)庫 --repair run repair on all dbs 修復(fù)所有的數(shù)據(jù)庫 --notablescan do not allow table scans 不運行表掃描 --syncdelay arg (=60) seconds between disk syncs (0 for never) 系統(tǒng)同步刷新磁盤的時間,默認是60s

2.啟動mongodb

$ mongo

總結(jié)

以上是生活随笔為你收集整理的linux 启动mongodb的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。