欢迎投稿

今日深度:

【MongoDB】Installation of MongoDB,mongodb

【MongoDB】Installation of MongoDB,mongodb


First what I wanna make clear is that in the official website the detailed process of installation has been described. you could call it throught the link 

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

in the front of the page, one question should be taken into consideration. as the following describes,


and just now I have installed the hotfix to resolve an issue with memory mapped files on windows.

according to the tip in the mongodb manual, the command "wmic os get osarchitecture" could find which version of windos you are running.  So supprising. 

because I download the zip version of software, in the software package, it contains the following content. 



and then in the d:program( I always install the devlopment software in the d:program). it depends on you. 


Now let's start the server. 



from the last sentence, we could know infomation that the server run successfully, and default port is 27017. 

use mongo command we could find the version installed , and then test success.




Exception what may happened. 


see http://blog.mongodb.org/post/137788967/32-bit-limitations





【MongoDB】怎停止MongoDB服务器

如果服务器是作为前台进程运行在终端的,就直接按Ctrl-C。否则,就用kill这种命令发出信号。如果mongod的PID是10014,就可以用kill -2 10014(SIGINT)或者kill 10014(SIGTERM)。
当mongod收到SIGINT或者SIGTERM时,会稳妥退出。也就是说会等到当前运行的操作或文件预分配完成(需要一些时间),关闭所有打开的连接,将缓存的数据刷新到磁盘,最后停止。 千万不要向运行中的MongoDB发送SIGKILL(kill -9)。这样会导致数据库直接关闭,上面降到的步骤都将被忽略,这会使数据文件损毁。
 

MongoDB安装后出现错误 如图,怎解决

安装?MongoDB的安装你是指的什么?
一般来说windows下的MongoDB只需要将官网上的文件解压出来即可,你需要做的是启动MongoDB服务。MongoDB的服务指的是mongod进程,也就是bin目录下的mongod.exe的启动。然后你可以利用MongoDB自带的客户端shell,即bin目录下的mongo.exe访问这一服务。
综上,我认为可能的原因:
1、肯定是这个啦,你没有启动MongoDB服务,用bin/mongod启动即可
2、是不是改变了默认端口,默认情况下MongoDB用的是27017,你如果改变了这一启动配置,如采用bin/mongod -por 27000,那么你就得用bin/mongo -port 27000来连接。
3、启动时mongod报错了,这个你得把日志发出来才能处理。
 

www.htsjk.Com true http://www.htsjk.com/shujukunews/3106.html NewsArticle 【MongoDB】Installation of MongoDB,mongodb First what I wanna make clear is that in the official website the detailed process of installation has been described. you could call it throught the link http://docs.mongodb.org/manual/tutoria...
评论暂时关闭