内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

mongoBD學習(二)客戶端的連接-創(chuàng)新互聯(lián)

mongo客戶端由bin/mongo啟動

0、幫助

root@adela-vm:/opt/mongodb_simple# ./bin/mongo --help
MongoDB shell version: 2.6.9
usage: ./bin/mongo [options] [db address] [file names (ending in .js)]

1、啟動mongoDB 客戶端進程

root@adela-vm:/opt/mongodb_simple# ./bin/mongo 127.0.0.1:12345/test
MongoDB shell version: 2.6.9
connecting to: 127.0.0.1:12345/test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
       http://docs.mongodb.org/
Questions? Try the support group
       http://groups.google.com/group/mongodb-user
>

2、關(guān)閉mongoDB 客戶端進程
方法1:
>db.shutdownServer()
> db.shutdownServer()
shutdown command only works with the admin database; try 'use admin'
必須要admin才能使用shutdown命令

> use admin
switched to db admin
> db.shutdownServer()
2015-03-27T11:33:49.502+0800 DBClientCursor::init call() failed
server should be down...
2015-03-27T11:33:49.506+0800 trying reconnect to 127.0.0.1:12345 (127.0.0.1) failed
2015-03-27T11:33:49.506+0800 warning: Failed to connect to 127.0.0.1:12345, reason: errno:111 Connection refused
2015-03-27T11:33:49.506+0800 reconnect 127.0.0.1:12345 (127.0.0.1) failed failed couldn't connect to server 127.0.0.1:12345 (127.0.0.1), connection attempt failed
>
方法2:kill -15 進程號或者kill (不加參數(shù))進程號
除非在特殊情況下,避免使用kill -9 進程號

3、重新啟動mongo
numactl --interleave=all bin/mongod -f conf/mongod.conf
The program 'numactl' is currently not installed. You can install it by typing:
apt-get install numactl

安裝numactl
apt-get install numactl
root@adela-vm:/opt/mongodb_simple/log# apt-get install numactl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
 numactl
0 upgraded, 1 newly installed, 0 to remove and 348 not upgraded.
Need to get 30.1 kB of archives.
After this operation, 135 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/universe numactl amd64 2.0.9~rc5-1ubuntu3 [30.1 kB]
Fetched 30.1 kB in 0s (62.3 kB/s)
Selecting previously unselected package numactl.
(Reading database ... 170689 files and directories currently installed.)
Preparing to unpack .../numactl_2.0.9~rc5-1ubuntu3_amd64.deb ...
Unpacking numactl (2.0.9~rc5-1ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up numactl (2.0.9~rc5-1ubuntu3) ...

重啟服務端
root@adela-vm:/opt/mongodb_simple# numactl --interleave=all bin/mongod -f conf/mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 4223
child process started successfully, parent exiting

4、查看日志
tail mongod.log
2015-03-27T11:42:38.343+0800 [initandlisten] waiting for connections on port 12345

業(yè)務包括:企業(yè)網(wǎng)站建設、移動網(wǎng)站建設、商城網(wǎng)站開發(fā)、網(wǎng)站營銷推廣等服務,并且涵蓋主機域名、虛擬主機、云服務器、等互聯(lián)網(wǎng)基礎(chǔ)服務;創(chuàng)新互聯(lián)聯(lián)建站以互聯(lián)網(wǎng)的創(chuàng)新理念,成熟完善的建站體系,開拓進取的精神,專業(yè)的解決方案和顧問咨詢服務,幫助客戶在互聯(lián)網(wǎng)時代提升形象、把握商機、實現(xiàn)價值,提高企業(yè)的核心競爭力。

5、啟動客戶端

root@adela-vm:/opt/mongodb_simple# ./bin/mongo 127.0.0.1:12345/test
MongoDB shell version: 2.6.9
connecting to: 127.0.0.1:12345/test
>

另外有需要云服務器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

文章名稱:mongoBD學習(二)客戶端的連接-創(chuàng)新互聯(lián)
標題來源:http://www.rwnh.cn/article18/epidp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化外貿(mào)建站、手機網(wǎng)站建設靜態(tài)網(wǎng)站、定制網(wǎng)站網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

小程序開發(fā)
浦北县| 五华县| 石家庄市| 城固县| 泸水县| 固始县| 梧州市| 湘西| 衡阳市| 中山市| 波密县| 内黄县| 馆陶县| 浦城县| 佛教| 六枝特区| 壶关县| 金沙县| 潮州市| 井研县| 高唐县| 桐柏县| 荔波县| 永寿县| 松桃| 阿尔山市| 舟山市| 土默特右旗| 铁力市| 甘肃省| 陵川县| 蓬安县| 平凉市| 资溪县| 金沙县| 海南省| 大宁县| 滁州市| 马尔康县| 尉犁县| 托克逊县|