File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,28 @@ The examples in this procedure create a new replica set named ``rs0``.
97
97
98
98
mongo --port 27017
99
99
100
+ #. Create a replica set configuration object in the :program:`mongo`
101
+ shell environment to use to initiate the replica set with the
102
+ following sequence of operations:
103
+
104
+ .. code-block:: javascript
105
+
106
+ rsconf = {
107
+ _id: "rs0",
108
+ members: [
109
+ {
110
+ _id: 0,
111
+ host: "<hostname>:27017"
112
+ }
113
+ ]
114
+ }
115
+
100
116
#. Use :method:`rs.initiate()` to initiate a replica set consisting of
101
117
the current member and using the default configuration:
102
118
103
119
.. code-block:: javascript
104
120
105
- rs.initiate()
121
+ rs.initiate( rsconf )
106
122
107
123
#. Display the current :doc:`replica configuration </reference/replica-configuration>`:
108
124
You can’t perform that action at this time.
0 commit comments