Turn: the MongoDB to a Windows Service

2011-07-25  来源:本站原创  分类:Database  人气:108 

Installation:

mongod.exe - bind_ip 127.0.0.1 - logpath D: \ 02_mogodb \ logs \ log.txt - logappend - dbpath D: \ 02_mogodb \ data - directoryperdb - install

Perform after the installation to the Windows service, attention to the need in the data directory is recommended db directory

1, Windows installation under

The official address is: http://www.mongodb.org/pages/viewpage.action?pageId=20742425

2, added to the Windows service can be activated via the command line, the official also described, but every time find more trouble, so recorded, and simple instructions

After installation, into the mongo's bin directory. For example:

view plain

  1. F: / mongo / bin>

Executive mongod.exe - help command to view help information:

view plain

  1. F: / mongo / bin> mongod.exe - help
  2. ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
  3. ** See http://blog.mongodb.org/post/137788967/32-bit-limitations
  4. ** With - dur, the limit is lower
  5. Allowed options:
  6. General options:
  7. -H [- help] show this usage information
  8. - Version show version information
  9. -F [- config] arg configuration file specifying additional options
  10. -V [- verbose] be more verbose (include multiple times for more
  11. verbosity eg-vvvvv)
  12. - Quiet quieter output
  13. - Port arg specify port number
  14. - Bind_ip arg comma separated list of ip addresses to listen on - all
  15. local ips by default
  16. - Logpath arg log file to send write to instead of stdout - has to be
  17. a file, not directory
  18. - Logappend append to logpath instead of over-writing
  19. - Pidfilepath arg full path to pidfile (if not set, no pidfile is
  20. created)
  21. - KeyFile arg private key for cluster authentication (only for
  22. replica sets)
  23. - Auth run with security
  24. - Cpu periodically show cpu and iowait utilization
  25. - Dbpath arg directory for datafiles
  26. - Diaglog arg 0 = off 1 = W 2 = R 3 = both 7 = W + some reads
  27. - Directoryperdb each database will be stored in a separate directory
  28. - Journal enable journaling
  29. - JournalOptions arg journal diagnostic options
  30. - Ipv6 enable IPv6 support (disabled by default)
  31. - Jsonp allow JSONP access via http (has security implications)
  32. - MaxConns arg max number of simultaneous connections
  33. - Noauth run without security
  34. - Nohttpinterface disable http interface
  35. - Noprealloc disable data file preallocation - will often hurt
  36. performance
  37. - Noscripting disable scripting engine
  38. - Notablescan do not allow table scans
  39. - Nssize arg (= 16). Ns file size (in MB) for new databases
  40. - Objcheck inspect client data for validity on receipt
  41. - Profile arg 0 = off 1 = slow, 2 = all
  42. - Quota limits each database to a certain number of files (8
  43. default)
  44. - QuotaFiles arg number of files allower per db, requires - quota
  45. - Rest turn on simple rest api
  46. - Repair run repair on all dbs
  47. - Repairpath arg root directory for repair files - defaults to dbpath
  48. - Slowms arg (= 100) value of slow for profile and console log
  49. - Smallfiles use a smaller default file size
  50. - Syncdelay arg (= 60) seconds between disk syncs (0 = never, but not
  51. recommended)
  52. - Sysinfo print some diagnostic system information
  53. - Upgrade upgrade db if needed
  54. Windows Service Control Manager options:
  55. - Install install mongodb service
  56. - Remove remove mongodb service
  57. - Reinstall reinstall mongodb service (equivilant of mongod
  58. - Remove followed by mongod - install)
  59. - ServiceName arg windows service name
  60. - ServiceDisplayName arg windows service display name
  61. - ServiceDescription arg windows service description
  62. - ServiceUser arg user name service executes as
  63. - ServicePassword arg password used to authenticate serviceUser
  64. Replication options:
  65. - Fastsync indicate that this instance is starting from a dbpath
  66. snapshot of the repl peer
  67. - Autoresync automatically resync if slave data is stale
  68. - OplogSize arg size limit (in MB) for op log
  69. Master / slave options:
  70. - Master master mode
  71. - Slave slave mode
  72. - Source arg when slave: specify master as <server:port>
  73. - Only arg when slave: specify a single database to replicate
  74. - Slavedelay arg specify delay (in seconds) to be used when applying
  75. master ops to slave
  76. Replica set options:
  77. - ReplSet arg arg is <setname> [/ <optionalseedhostlist>]
  78. Sharding options:
  79. - Configsvr declare this is a config db of a cluster; default port
  80. 27019; default dir / data / configdb
  81. - Shardsvr declare this is a shard db of a cluster; default port
  82. 27018
  83. - NoMoveParanoia turn off paranoid saving of data for moveChunk. This
  84. is on by default for now, but default will switch

The following to be added to the Windows service MongoDB:

view plain

  1. F: / mongo / bin> mongod.exe - dbpath = F: / mongo / data - logpath = F: / mongo / logs / logs.txt
  2. - Logappend - bind_ip 127.0.0.1 - directoryperdb - install

Talk about the parameters it:

- Dbpath the specified database storage path

- Logpath specify a log file

- Logappend appending

- Bind_ip bind IP address

- Directoryperdb each database is stored in a separate folder

- Install to install the Windows Service

Can see similar success the following information:

view plain

  1. all output going to: F: / mongo / logs / logs.txt
  2. Creating service MongoDB.
  3. Service creation successful.
  4. Service can be started from the command line via 'net start "MongoDB"'.

After the cmd command line can be a way to start and stop, does not appear that "can not close the" black box up.

相关文章
  • Turn: the MongoDB to a Windows Service 2011-07-25

    Installation: mongod.exe - bind_ip 127.0.0.1 - logpath D: \ 02_mogodb \ logs \ log.txt - logappend - dbpath D: \ 02_mogodb \ data - directoryperdb - install Perform after the installation to the Windows service, attention to the need in the data dire

  • mongodb Getting Started: windows version 2011-09-05

    (1) Download mongodb window version: http://www.mongodb.org/dr/downloads.mongodb.org/win32/mongodb-win32-i386-1.8.3.zip/download (2), set MongoDB directory (extract the zip file) to extract it to d: \, then rename mongodb, the path is d: \ mongodb (3

  • Turn: the MongoDB added to the Windows service 2011-07-25

    Installation: mongod.exe - bind_ip 127.0.0.1 - logpath D: \ 02_mogodb \ logs \ log.txt - logappend - dbpath D: \ 02_mogodb \ data - directoryperdb - install Perform after the installation to the Windows service, attention to the need in the data dire

  • mongodb 1.8.2 windows service start fail 2011-06-18

    Service start error: error2: system can not find the file specified. solution: Installation services, you need to use the full path mongod.exe C: \ mongodb-win32-i386-1.8.2 \ bin \ mongod.exe - logpath c: \ mongo db \ logs \ mongo.log - dbpath c: \ m

  • (Translation) two MongoDB entry - as a windows service 2011-10-09

    Original Address: http://www.mongodb.org/display/DOCS/Windows+Service In the windows platform, mongod.exe have local support to install and run as a windows service. Service-Related Commands Service-related commands are: mongod --install mongod --ser

  • Nginx installed as a Windows service method 2009-09-10

    1. Nginx windows version download http://www.nginx.org 2. To download Microsoft's two tools: instsrv.exe, srvany.exe Go to Microsoft's Web site to download and install Windows Server 2003 Resource Kit Tools (rktools.exe), which includes the title ref

  • The Java program into Windows Service 2010-07-09

    I. Introduction Java language programmers are more and more attention. And Java-related applications are more and more. Although Java is a cross-platform language, but there are many applications in China are running under Windows. In particular, som

  • MongoDB - Installation chapter (windows) 2011-04-26

    1, download MongoDB database http://fastdl.mongodb.org/win32/mongodb-win32-i386-1.6.5.zip; 2, extract the installation files to the C drive (Note: The installation path can not have spaces), the configuration "Environment Variables" will% MONGOD

  • mongoDB tested under Windows installation 2011-06-11

    MongoDB ( http://www.mongodb.org ) is a document type NoSQL database management system, that is not a traditional relational database (like Oracle, MS-SQLServer, MySQL, etc.). Traditional relational database, data is encoded as a binary format in the

  • 将mongodb安装为windows服务 2013-01-15

    首先 下载mongodb: http://www.mongodb.org/downloads 解压到自己喜欢的一个目录 D:\nosql\mongodb 配置MONGODB_HOME环境变量 MONGODB_HOME=D:\nosql\mongodb\mongodb-win32-i386-2.0.6 修改path变量值:在最后加上%MONGODB_HOME%\bin; 编写安装批处理语句: mongod --logpath D:\nosql\mongodb\logs\mongodb.log --

  • Weblogic9.2 registered as a windows service 2010-03-29

    Register windows service using the command beasvc 1) Copy weblogic8.1domain directory installService.cmd, modify the following variables: set WL_HOME = D: \ bea92 \ weblogic92 # weblogic92 the root directory set JAVA_HOME = D: \ bea92 \ jrockit90_150

  • Registration svnserve as Windows Service 2010-03-17

    Open a DOS command window, execute the following command: sc create svnserve binPath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root F:\svn_repository_server" displayname= "Subversion Repository" depend= T

  • Free version of the Tomcat installation for registration as a windows service --- Reading (change) 2010-04-16

    Free version of the Tomcat installation for registration as a windows service --- s (Transfer from http://www.javaeye.com/topic/426413) The official website of the Apache Tomcat download free installation tomcat 5.5.20, should be registered as system

  • The Tomcat is installed as Windows service 2010-05-04

    http://blog.chinaunix.net/u/9001/showart_2212827.html The Tomcat is installed as Windows services, and bring them to the specified database service startup after startup. <!--[ If! SupportLists] -> 1. <!--[ Endif] -> the Tomcat installed as a

  • C # to create Windows Service 2010-06-24

    A project some time ago the company used Windows Service, is mainly used to record in the Event log in the client to do some operations. Are in order as follows: 1.. Net can be created directly on the Windows Service project, I am using C #, for exam

  • Windows service not reboot after the uninstall before installing problem 2010-06-24

    After uninstalling a windows service will not immediately disappear from the list of services, but the list of services displayed in the service is disabled; so you need to install the same name in the service, the equipment can not, and will be the

  • Fabrication and installation works to install the Windows Service by 2010-06-24

    On one of http://canbeatle.javaeye.com/blog/698364, I wrote a Windows Service, this chapter will make a setup program to install Windows on this service, follow these steps: 1. In just the Windows Service project, add a Setup project (Other Project T

  • Production to installation by installing Windows Service 2010-06-24

    On one of http://canbeatle.javaeye.com/blog/698364, I wrote a Windows Service, this chapter will make a setup program to install Windows on this service, follow these steps: 1. In just the Windows Service project and add a Setup Project (Other Projec

  • Uninstall Windows service not reboot after installing problems before 2010-06-24

    After uninstalling a windows service will not disappear immediately from the list of services, but in the list of services displayed in the service is disabled; so you need to install the same name in the service, the equipment can not, and will be t

  • Windows service does not restart the machine after the uninstall prior to installing problem 2010-06-24

    After uninstalling a windows service will not immediately disappear from the list of services, but the list of services displayed in the service is disabled; so you need to install the same name in the service, the equipment can not, and will be the