How to configure ssl in mongodb? - mongodb

I have followed document to configure ssl in mongodb. But no luck.The mongod service doesnot start after configuring ssl in mongo.conf.
I have gone through and looks like i need to use Scon first to support SSL/TLS.
Can anyone please share steps or document, I need to follow first .
I am using mongo version 2.6

This wiki should cover everything you need to build from source using scons. Ensure you have the correct ssl package installed as mentioned in the System Specific Requirements. Your scons command will look
scons mongod --ssl
If you are able to upgrade to mongodb 3.0+ from 2.6 most distributions include ssl support.

Related

mongodb installation in pc

I install mongodp from its web but when its complete its not showing anything i can follow my teacher but in c mongodb 6.0 bin mongodb its not opened but in mongosh its work proper it show the version of mongodb and version of mongosh and show database als but i want to follow my teacher so it is necessary to open from bin. plz 😣 help please.
i want to open mongodb from bin but its not opened from bin but its work properly from mongosh. iwant to follow my teacher.
i reinstall mongodb and also delte from c but its not working. i repair it mongodb install repair option but the problem is not solved.
mongo binary is legacy shell and no longer shipped with server binaries. See for details. If you, for some reason, need it, you should download a server binaries < 6.0, like 5.0.14 from here. And just copy mongo binary from there (without the rest server binaries).

How do I install MongoDB on FreeDSB if the port was apparently removed?

Running sudo pkg install mongodb produces an error stating that no such package exists. I figured this is because it says on this website https://www.freshports.org/databases/mongodb/ that the MongoDB port has expired and has been removed. How do I get a version of MongoDB on my FreeBSD server now?
I recommend that every time you want to install a package you perform a pkg search
pkg search packagename
For MongoDB:
root#demo:/ # pkg search mongodb
mongodb32-3.2.11_2 Distributed document-oriented "NoSQL" database
mongodb32-tools-3.2.11 Tools for MongoDB
mongodb34-3.4.16 Distributed document-oriented "NoSQL" database
mongodb34-tools-3.4.9 Tools for MongoDB
mongodb36-3.6.6_2 Distributed document-oriented "NoSQL" database
mongodb36-tools-3.6.3 Tools for MongoDB
p5-Mojolicious-Plugin-Mongodb-1.16_1 Use MongoDB in Mojolicious
p5-MongoDB-2.0.1 Mongo Driver for Perl
php56-pecl-mongodb-1.5.2 PECL classes for MongoDB
php70-pecl-mongodb-1.5.2 PECL classes for MongoDB
php71-pecl-mongodb-1.5.2 PECL classes for MongoDB
php72-pecl-mongodb-1.5.2 PECL classes for MongoDB
py27-mtools-mongodb-1.2.3_2 Setup test environments; parse, filter and visualize MongoDB log files
py27-nagios-check_mongodb-0.1 Nagios plugin to check mongodb server
As you can see there are mongodb32, mongodb34 and mongodb36
You can then perform the following:
pkg install mongodb36-3.6.6_2
You could also install packages from ports but it's more time consuming and in the most cases is not necessary, unless you want to enable custom flags/modules to your mongodb installation.
https://www.freebsd.org/doc/handbook/ports-using.html
There is a note on the website you linked to that the MongoDB port was moved to databases/mongodb34.
Chapter 4.4. Using pkg for Binary Package Management of the FreeBSD Handbook might help you to deal with the situation you describe (especially 4.4.9. Modifying Package Metadata).
I am not sure, however, if there is an easy update path. I've never tried it.

How to decide which MongoDB binary to install on MacOS?

The official documentation of MongoDB provides two commands for downloading binaries:
brew install mongodb
brew install mongodb --with-openssl
I want to know what are the differences between the two of them. Primarily, I would like to understand which binary should I download under what scenarios?
Recent versions of the MongoDB Homebrew recipe include SSL by default (which matches the default downloads from the MongoDB Download Center). The --with-openssl option has been removed and there is no longer a need to choose between versions. The MongoDB documentation will be updated to reflect this (see DOCS-10347).
Distributions with TLS/SSL support are recommended (even if you aren't currently using this feature) so you have the option available. Third party cloud-hosted services (eg. MongoDB Atlas) generally require network encryption, and this is also one of the recommendations in the MongoDB Security Checklist for protecting your own deployments.
Do you need TLS/SSL support?
If the answer is "no", use command 1.
If the answer is "I don't know", use command 1.
If the answer is "yes", use command 2.
Command 1 will download MongoDB pre-compiled binaries, that don't include TLS/SSL support. Command 2 will compile MongoDB source code with TLS/SSL support, which is useful if you want the communication between your application and MongoDB to be encrypted, or if you're trying to access a database that only accept encrypted connections.
Command 1 will be much faster than command 2 since it will only fetch binaries rather than compiling plenty of stuff.

Mongo details are not showing in phpinfo() in windows

I am installing mongodb on my windows 7 PC. I have installed mongodb 3.0 along with the necessary drivers & tried starting mongo server, it is working well but when i open the localhost & check for the phpinfo page, it does not show me the details of mongo. I also am using Umongo client for database interaction where i am not able to create database manually. It is just because of this? Where is the problem?. How to resolve this?
Please read this document to add php_mongo.dll services in php 5.3 and later
For adding mongo db in php you need to add php_mongo.dll in your wamp directory
Example:
c:\wamp\bin\php\php5.5.12\ext
Document: https://docs.mongodb.org/ecosystem/drivers/php/

How do I update the mongodb binaries in my nitrous.io box to the 2.4.x versions?

I am taking the "mongodb for node.js" course and trying to import/restore data to my mongolab instance but I keep getting Auth err code 18 errors.
I can connect to any instance I create using the mongo --shell from the nitrous.io box and it works fine. So my connect string and env variables are correct. If I change the password when logging in to mongo shell it actually gives me the opportunity to put in the correct password. So I know the user authentication is proper.
I am confused as to why I still get Auth err code 18 errors when I try to use the supplied mongodump files.
I have also tried specifying individual .bson files and that gives the same error as well.
I am connecting to mongod version 2.4.6 but mongorestore is only 2.0.4 on the nitrous.io box. I wanted to update to the newer version and see if this is the problem. I have read other posts from other sites where this seemd to break in version 2.2.2. while importing using older versions of the binaries for restore.
it does not appear you(nitrous.io developers) leave a way to update or support mongodb versioning. Do you have a way I could update to mongodb v2.4.6?
also if you could add htop and bmon to your image that would be nice.
Nitrous has released a package manager dubbed autoparts which will allow you to install mongodb 2.4.6.
Autoparts requires you to have a Nitrous box on version "bran" or later. If you are on version "arya" then you will need to download the contents within your box (SCP or Nitrous Mac App), terminate the box, followed by creating a new box in order to upgrade.
Take a look at the README within the Github Repo for instructions on how to use autoparts:
https://github.com/action-io/autoparts
To install/update mongodb to the latest version, run the following command:
parts install mongodb
After the installation completes, run mongo in the console to check the version. You may need to restart the console if it is reporting an older version.