Unauthorized dropDatabase in MangoDB
Unauthorized dropDatabase in MangoDB Read More »
You must set an admin and password before using mongDB for security reason. You may receive some error when you login to MongoDB shell.
MongoDB set up admin and security after installed Read More »
I need to find out the duplicate data content in my 40 Millions records, then I can make the unique index to my name field. [code lang=”shell”] > db.collecton.aggregate([ … { $group : {_id : "$field_name", total : { $sum : 1 } } }, … { $match : { total : { $gte :
Fast way to find duplicate data in MongoDB Read More »
[code lang=”shell”] vim /etc/yum.repos.d/mongodb.repo [/code] Paste this to the file and save using :wq [code lang=”shell”] [MongoDB] name=MongoDB Repository baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpgcheck=0 enabled=1 [/code] Download and install mongodb using yum [code lang=”shell”] yum install mongodb-org -y [/code] Start mongod and configure auto start while system boot [code lang=”shell”] /etc/init.d/mongod restart chkconfig mongod on [/code] Check all
How to Install MongoDB 3.2 on CentOS 7 Read More »
After I install MongoDB 3.2.3 in Centos 7, I received this error when I start mongo in shell. Solution Create the init.d script. Create the following file at /etc/init.d/disable-transparent-hugepages: Make it executable. Run the following command to ensure that the init script can be used:
WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ‘always’. Read More »
[code lang=”shell”] [root@master ~]# mongo MongoDB shell version: 3.2.3 connecting to: test Server has startup warnings: 2016-02-29T23:11:36.666+0700 I CONTROL [initandlisten] 2016-02-29T23:11:36.667+0700 I CONTROL [initandlisten] ** WARNING: Cannot detect if NUMA interleaving is enabled. Failed to probe "/sys/devices/system/node/node1": Permission denied 2016-02-29T23:11:36.667+0700 W CONTROL [initandlisten] 2016-02-29T23:11:36.667+0700 W CONTROL [initandlisten] Failed to probe "/sys/kernel/mm/transparent_hugepage": Permission denied 2016-02-29T23:11:36.667+0700 W
I’ve received this error while starting mongo in shell while installing on [code lang=”shell”] [root@master ~]# mongod –version db version v3.2.3 git version: b326ba837cf6f49d65c2f85e1b70f6f31ece7937 OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013 allocator: tcmalloc modules: none build environment: distmod: rhel70 distarch: x86_64 target_arch: x86_64 [root@master ~]# mongo –version MongoDB shell version: 3.2.3 CentOS Linux release 7.2.1511