1. 程式人生 > >mongo-三節點叢集安裝

mongo-三節點叢集安裝

[[email protected] bin]$ /opt/mongodb/mongodb-linux-x86_64-rhel62-3.2.5/bin/mongo --port 12001 MongoDB shell version: 3.2.5 connecting to: 127.0.0.1:12001/test Server has startup warnings:  2016-04-19T15:39:51.957+0800 I CONTROL  [main]  2016-04-19T15:39:51.957+0800 I CONTROL  [main] ** WARNING: Insecure configuration, access control is not enabled and no --bind_ip has been specified. 2016-04-19T15:39:51.957+0800 I CONTROL  [main] **          Read and write access to data and configuration is unrestricted,  2016-04-19T15:39:51.957+0800 I CONTROL  [main] **          and the server listens on all available network interfaces. 2016-04-19T15:39:51.957+0800 I CONTROL  [main]  mongos> use admin switched to db admin mongos> db.auth("dbadmin","Dbadmin$319") 1 mongos> exit bye [
[email protected]
 bin]$ /opt/mongodb/mongodb-linux-x86_64-rhel62-3.2.5/bin/mongo localhost:12001/admin -u dbadmin -p  MongoDB shell version: 3.2.5 Enter password:  connecting to: localhost:12001/admin Server has startup warnings:  2016-04-19T15:39:51.957+0800 I CONTROL  [main]  2016-04-19T15:39:51.957+0800 I CONTROL  [main] ** WARNING: Insecure configuration, access control is not enabled and no --bind_ip has been specified. 2016-04-19T15:39:51.957+0800 I CONTROL  [main] **          Read and write access to data and configuration is unrestricted,  2016-04-19T15:39:51.957+0800 I CONTROL  [main] **          and the server listens on all available network interfaces. 2016-04-19T15:39:51.957+0800 I CONTROL  [main]  mongos>