UNPKG

2.27 kBMarkdownView Raw
1# mongodb-version-manager [![travis][travis_img]][travis_url] [![npm][npm_img]][npm_url] [![appveyor][appveyor_img]][appveyor_url]
2
3> Install and manage multiple versions of MongoDB.
4
5## Install
6
7```sh
8npm install -g mongodb-version-manager
9```
10
11## Usage
12
13```sh
14$ m
15Usage:
16 m use <version> [--branch=<branch> --distro=<distro> --enterprise]
17 m url <version> [--branch=<branch> --distro=<distro> --enterprise]
18 m available [--stable --unstable --rc --pokemon]
19 m path
20```
21
22Once you've installed your first version of mongo with the `m use` command, update your `~/.bashrc` file:
23
24```sh
25export PATH=~/.mongodb/versions/mongodb-current/bin:$PATH
26```
27
28When installed globally, each version of MongoDB you've installed are stored under `~/.mongodb/versions`:
29
30```
31├── mongodb-3.0.7-osx-64
32├── mongodb-3.2.0-osx-64
33├── mongodb-3.3.8-osx-64-enterprise
34├── mongodb-3.4.0-rc2-osx-64
35├── mongodb-3.4.4-osx-64
36├── mongodb-3.4.5-osx-64-enterprise
37├── mongodb-3.5.1-osx-64
38├── mongodb-3.6.3-osx-64
39├── mongodb-3.6.4-osx-64
40├── mongodb-3.7.3-osx-64
41└── mongodb-current -> ~/.mongodb/versions/mongodb-3.6.4-osx-64
42```
43
44The contents of each directory under `~/.mongodb/versions/mongodb-*` are:
45
46```
47├── GNU-AGPL-3.0
48├── MPL-2
49├── README
50├── THIRD-PARTY-NOTICES
51└── bin
52 ├── bsondump
53 ├── install_compass
54 ├── mongo
55 ├── mongod
56 ├── mongodump
57 ├── mongoexport
58 ├── mongofiles
59 ├── mongoimport
60 ├── mongoperf
61 ├── mongoreplay
62 ├── mongorestore
63 ├── mongos
64 ├── mongostat
65 └── mongotop
66```
67
68## Related
69
70* [`mongodb-runner`](https://github.com/mongodb-js/runner) Easily control MongoDB for testing.
71
72## License
73
74Apache 2.0
75
76[travis_img]: https://img.shields.io/travis/mongodb-js/version-manager.svg
77[travis_url]: https://secure.travis-ci.org/mongodb-js/version-manager
78[appveyor_img]: https://ci.appveyor.com/api/projects/status/s3xm8f9eqiakqusn?svg=true
79[appveyor_url]: https://ci.appveyor.com/project/imlucas/mongodb-version-manager
80[npm_img]: https://img.shields.io/npm/v/mongodb-version-manager.svg
81[npm_url]: https://npmjs.org/package/mongodb-version-manager