新聞中心
最近想嘗試一下英特爾的基于WebRTC協(xié)同通信開發(fā)套件,其中的CS_WebRTC_Conference_Server_MCU依賴MongoDB。

讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來(lái)自于我們對(duì)這個(gè)行業(yè)的熱愛。我們立志把好的技術(shù)通過(guò)有效、簡(jiǎn)單的方式提供給客戶,將通過(guò)不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:域名與空間、網(wǎng)頁(yè)空間、營(yíng)銷軟件、網(wǎng)站建設(shè)、石拐網(wǎng)站維護(hù)、網(wǎng)站推廣。
MongoDB是什么?
MongoDB 是一個(gè)基于分布式文件存儲(chǔ)的數(shù)據(jù)庫(kù)。由 C++ 語(yǔ)言編寫。旨在為 WEB 應(yīng)用提供可擴(kuò)展的高性能數(shù)據(jù)存儲(chǔ)解決方案。
MongoDB 是一個(gè)介于關(guān)系數(shù)據(jù)庫(kù)和非關(guān)系數(shù)據(jù)庫(kù)之間的產(chǎn)品,是非關(guān)系數(shù)據(jù)庫(kù)當(dāng)中功能最豐富,最像關(guān)系數(shù)據(jù)庫(kù)的。
安裝MongoDB
https://docs.mongodb.org/getting-started/shell/tutorial/install-on-linux/
1、創(chuàng)建repo
vi /etc/yum.repos.d/mongodb-org-3.2.repo
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/RedHat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1
2、安裝MongoDB和相關(guān)工具
sudo yum install -y mongodb-org
3、啟動(dòng)MongoDB
sudo service mongod start4、驗(yàn)證MongoDB是否啟動(dòng)成功
cat /var/log/mongodb/mongod.log
查看是否有一句:[initandlisten] waiting for connections on port
其中
5、使MongoDB開機(jī)自動(dòng)啟動(dòng)
sudo chkconfig mongod on
6、停止MongoDB
sudo service mongod stop
7、重啟MongoDB
sudo service mongod restart
服務(wù)器配置: /etc/mongod.conf
# mongo.conf
#where to log
logpath=/var/log/mongo/mongod.log
logappend=true #以追加方式寫入日志
# fork and run in background
fork = true
#port = 27017 #端口
dbpath=/var/lib/mongo #數(shù)據(jù)庫(kù)文件保存位置
directoryperdb=true
# Enables periodic logging of CPU utilization and I/O wait
#啟用定期記錄CPU利用率和 I/O 等待
#cpu = true
# Turn on/off security. Off is currently the default
# 是否以安全認(rèn)證方式運(yùn)行,默認(rèn)是不認(rèn)證的非安全方式
#noauth = true
#auth = true
# Verbose logging output.
# 詳細(xì)記錄輸出
#verbose = true
# Inspect all client data for validity on receipt (useful for
# developing drivers)用于開發(fā)驅(qū)動(dòng)程序時(shí)的檢查客戶端接收數(shù)據(jù)的有效性
#objcheck = true
# Enable db quota management 啟用數(shù)據(jù)庫(kù)配額管理,默認(rèn)每個(gè)db可以有8個(gè)文件,可以用quotaFiles參數(shù)設(shè)置
#quota = true
# 設(shè)置oplog記錄等級(jí)
# Set oplogging level where n is
# 0=off (default)
# 1=W
# 2=R
# 3=both
# 7=W+some reads
#oplog = 0
# Diagnostic/debugging option 動(dòng)態(tài)調(diào)試項(xiàng)
#nocursors = true
# Ignore query hints 忽略查詢提示
#nohints = true
# 禁用http界面,默認(rèn)為localhost:28017
# Disable the HTTP interface (Defaults to localhost:27018).這個(gè)端口號(hào)寫的是錯(cuò)的
#nohttpinterface = true
# 關(guān)閉服務(wù)器端腳本,這將極大的限制功能
# Turns off server-side scripting. This will result in greatly limited
# functionality
#noscripting = true
# 關(guān)閉掃描表,任何查詢將會(huì)是掃描失敗
# Turns off table scans. Any query that would do a table scan fails.
#notablescan = true
# 關(guān)閉數(shù)據(jù)文件預(yù)分配
# Disable data file preallocation.
#noprealloc = true
# 為新數(shù)據(jù)庫(kù)指定.ns文件的大小,單位:MB
# Specify .ns file size for new databases.
# nssize =
# Accout token for Mongo monitoring server.
#mms-token =
# mongo監(jiān)控服務(wù)器的名稱
# Server name for Mongo monitoring server.
#mms-name =
# mongo監(jiān)控服務(wù)器的ping 間隔
# Ping interval for Mongo monitoring server.
#mms-interval =
# Replication Options 復(fù)制選項(xiàng)
# in replicated mongo databases, specify here whether this is a slave or master 在復(fù)制中,指定當(dāng)前是從屬關(guān)系
#slave = true
#source = master.example.com
# Slave only: specify a single database to replicate
#only = master.example.com
# or
#master = true
#source = slave.example.com
小結(jié)
通過(guò)yum安裝是非常簡(jiǎn)單方便的,
不需要糾結(jié)依賴項(xiàng)的問(wèn)題。
網(wǎng)站名稱:CentOS6.5下通過(guò)yum安裝MongoDB過(guò)程筆記
瀏覽地址:http://www.dlmjj.cn/article/cccjgco.html


咨詢
建站咨詢
