@@ -4,121 +4,5 @@ Install MongoDB on Debian
4
4
5
5
.. default-domain:: mongodb
6
6
7
- .. contents:: On this page
8
- :local:
9
- :backlinks: none
10
- :depth: 1
11
- :class: singlecol
7
+ .. include:: /includes/fact-download-mongodb-linux.rst
12
8
13
- This tutorial outlines the steps to install :term:`MongoDB` on Debian
14
- systems. The tutorial uses ``.deb`` packages to install. While some
15
- Debian distributions include their own MongoDB packages, the official
16
- MongoDB packages are generally more up to date.
17
-
18
- .. note::
19
-
20
- This tutorial applies to both Debian systems and versions of Ubuntu
21
- Linux prior to 9.10 "Karmic" which do not use Upstart. Other Ubuntu
22
- users will want to follow the :doc:`/tutorial/install-mongodb-on-ubuntu`
23
- tutorial.
24
-
25
- Package Options
26
- ---------------
27
-
28
- The downloads repository provides the ``mongodb-10gen`` package,
29
- which contains the latest **stable** release. Additionally you can
30
- :ref:`install previous releases <install-debian-version-pinning>` of MongoDB.
31
-
32
- You cannot install this package concurrently with the ``mongodb``,
33
- ``mongodb-server``, or ``mongodb-clients`` packages that
34
- your release of Debian may include.
35
-
36
- Install MongoDB
37
- ---------------
38
-
39
- Configure Package Management System (APT)
40
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41
-
42
- The Debian package management tools (i.e. ``dpkg`` and ``apt``) ensure
43
- package consistency and authenticity by requiring that distributors
44
- sign packages with GPG keys.
45
-
46
- .. include:: /includes/steps/install-configure-debian-packages.rst
47
-
48
-
49
- Install Packages
50
- ~~~~~~~~~~~~~~~~
51
-
52
- Issue the following command to install the latest stable version of
53
- MongoDB:
54
-
55
- .. code-block:: sh
56
-
57
- sudo apt-get install mongodb-10gen
58
-
59
- When this command completes, you have successfully installed MongoDB!
60
-
61
- .. _install-debian-version-pinning:
62
-
63
- Manage Installed Versions
64
- ~~~~~~~~~~~~~~~~~~~~~~~~~
65
-
66
- You can use the ``mongodb-10gen`` package to install previous versions
67
- of MongoDB. To install a specific release, append the version number
68
- to the package name, as in the following example:
69
-
70
- .. code-block:: sh
71
-
72
- apt-get install mongodb-10gen=2.2.3
73
-
74
- This will install the ``2.2.3`` release of MongoDB. You can specify
75
- any available version of MongoDB; however ``apt-get`` **will** upgrade
76
- the ``mongodb-10gen`` package when a newer version becomes available. Use
77
- the following *pinning* procedure to prevent unintended upgrades.
78
-
79
- To pin a package, issue the following command at the system prompt to
80
- *pin* the version of MongoDB at the currently installed version:
81
-
82
- .. code-block:: sh
83
-
84
- echo "mongodb-10gen hold" | sudo dpkg --set-selections
85
-
86
- Control Scripts
87
- ---------------
88
-
89
- .. include:: /includes/fact-unix-control-scripts.rst
90
-
91
- Run MongoDB
92
- -----------
93
-
94
- .. include:: /includes/fact-unix-data-and-log-dir.rst
95
-
96
- Start MongoDB
97
- ~~~~~~~~~~~~~
98
-
99
- Issue the following command to start :binary:`~bin.mongod`:
100
-
101
- .. code-block:: sh
102
-
103
- sudo /etc/init.d/mongodb start
104
-
105
- You can verify that :binary:`~bin.mongod` has started successfully by checking the
106
- contents of the log file at ``/var/log/mongodb/mongodb.log``.
107
-
108
- Stop MongoDB
109
- ~~~~~~~~~~~~
110
-
111
- Issue the following command to stop :binary:`~bin.mongod`:
112
-
113
- .. code-block:: sh
114
-
115
- sudo /etc/init.d/mongodb stop
116
-
117
- Restart MongoDB
118
- ~~~~~~~~~~~~~~~
119
-
120
- Issue the following command to restart :binary:`~bin.mongod`:
121
-
122
- .. code-block:: sh
123
-
124
- sudo /etc/init.d/mongodb restart
0 commit comments