[英]How can I install two versions of mongodb parallely in Ubuntu 12.04 ?
You can run multiple mongoDB version on the same host as long as these version are not in the same Replica Set as a general rule (which judging by your question will not be a problem). 您可以在同一主机上运行多个mongoDB版本,只要这些版本与一般规则不在同一个副本集中(根据您的问题判断不会出现问题)。
Deploy 2 installation paths. 部署2个安装路径。
Start the application using: 使用以下命令启动应用
(where 12345 is the port you specified) To start the exe on a different port. (其中12345是您指定的端口)在另一个端口上启动exe。
Default port is 27017 if port not specified in the command. 如果未在命令中指定端口,则默认端口为27017。
See http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/ 见http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/
Example: 例:
C:\\mongo1\\bin\\mongod.exe C:\\ mongo1 \\ BIN \\ mongod.exe
C:\\mongo1\\data\\ C:\\ mongo1 \\数据\\
C:\\mongo2\\bin\\mongod.exe C:\\ mongo2 \\ BIN \\ mongod.exe
C:\\mongo2\\data\\ C:\\ mongo2 \\数据\\
start /bc:\\mongo1\\bin\\mongod --dbpath "c:\\mongo1\\data" --port 27017 start / bc:\\ mongo1 \\ bin \\ mongod --dbpath“c:\\ mongo1 \\ data”--port 27017
start /bc:\\mongo2\\bin\\mongod --dbpath "c:\\mongo2\\data" --port 27050 start / bc:\\ mongo2 \\ bin \\ mongod --dbpath“c:\\ mongo2 \\ data”--port 27050
When connecting using MONGO.exe be sure to specify port to connect to correct instance. 使用MONGO.exe连接时,请确保指定连接到正确实例的端口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.