系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > Linux安裝配置mongodb

Linux安裝配置mongodb的方法(2)

時(shí)間:2015-06-08 16:59:01 作者:qipeng 來(lái)源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪問(wèn): https://m.xitongzhijia.net/xtjc/20150608/50319.html 手機(jī)查看 評(píng)論

  –fork fork server process 以創(chuàng)建子進(jìn)程的方式運(yùn)行

  –cpu periodically show cpu and iowait utilization 周期性的顯示cpu和io的使用情

  況

  –noauth run without security 無(wú)認(rèn)證模式運(yùn)行

  –auth run with security 認(rèn)證模式運(yùn)行

  –objcheck inspect client data for validity on receipt 檢查客戶端輸入數(shù)據(jù)的有效性檢

  查

  –quota enable db quota management 開始數(shù)據(jù)庫(kù)配額的管理

  –quotaFiles arg number of files allower per db, requires –quota 規(guī)定每個(gè)數(shù)據(jù)庫(kù)允許的文

  件數(shù)

  –appsrvpath arg root directory for the babble app server

  –nocursors diagnostic/debugging option 調(diào)試診斷選項(xiàng)

  –nohints ignore query hints 忽略查詢命中率

  –nohttpinterface disable http interface 關(guān)閉http接口,默認(rèn)是28017

  –noscripting disable scripting engine 關(guān)閉腳本引擎

  –noprealloc disable data file preallocation 關(guān)閉數(shù)據(jù)庫(kù)文件大小預(yù)分配

  –smallfiles use a smaller default file size 使用較小的默認(rèn)文件大小

  –nssize arg (=16) .ns file size (in MB) for new databases 新數(shù)據(jù)庫(kù)ns文件的默認(rèn)大小

  –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ù)庫(kù)

  –repair run repair on all dbs 修復(fù)所有的數(shù)據(jù)庫(kù)

  –notablescan do not allow table scans 不運(yùn)行表掃描

  –syncdelay arg (=60) seconds between disk syncs (0 for never) 系統(tǒng)同步刷新磁盤的時(shí)間,默認(rèn)是

  60s

  Replication options:

  –master master mode 主復(fù)制模式

  –slave slave mode 從復(fù)制模式

  –source arg when slave: specify master as 《server:port》 當(dāng)為從時(shí),指定主的地址和端口

  –only arg when slave: specify a single database to replicate 當(dāng)為從時(shí),指定需要從主復(fù)

  制的單一庫(kù)

  –pairwith arg address of server to pair with

  –arbiter arg address of arbiter server 仲裁服務(wù)器,在主主中和pair中用到

  –autoresync automatically resync if slave data is stale 自動(dòng)同步從的數(shù)據(jù)

  –oplogSize arg size limit (in MB) for op log 指定操作日志的大小

  –opIdMem arg size limit (in bytes) for in memory storage of op ids指定存儲(chǔ)操作日志的內(nèi)存

  大小

  Sharding options:

  –configsvr declare this is a config db of a cluster 指定shard中的配置服務(wù)器

  –shardsvr declare this is a shard db of a cluster 指定shard服務(wù)器

  6. 進(jìn)入數(shù)據(jù)庫(kù)的CLI管理界面

  cd到mongodb目錄下的bin文件夾,執(zhí)行命令。/mongo

  運(yùn)行如下:

 。踨oot@namenode mongodb]# 。/bin/mongo

  MongoDB shell version: 1.8.2

  connecting to: test

  》 use test;

  switched to db test

  若數(shù)據(jù)庫(kù)出現(xiàn)如不能連上,則是一個(gè)data目錄下的mongod.lock文件的問(wèn)題,可以用如下的修復(fù)的命令,

  mongod –repair

  上面就是Linux安裝配置mongodb的方法介紹了,軟件包可自己需找網(wǎng)站下載,mongodb安裝前需做一些準(zhǔn)備。

標(biāo)簽 mongodb

發(fā)表評(píng)論

0

沒(méi)有更多評(píng)論了

評(píng)論就這些咯,讓大家也知道你的獨(dú)特見(jiàn)解

立即評(píng)論

以上留言僅代表用戶個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

掃碼關(guān)注
掃碼關(guān)注

掃碼關(guān)注 官方交流群 軟件收錄