0% found this document useful (0 votes)
112 views4 pages

Installing Mongodb Community Edition On Ubuntu 2. Installing The Mongodb C Driver (Libmongoc) and Bson Library (Libbson) 2.1. Starting Mongodb

The document outlines the steps to install MongoDB Community Edition on Ubuntu, including importing keys, configuring repositories, installing packages, and setting ulimit thresholds. It also covers installing the MongoDB C driver and BSON library, and describes starting MongoDB by checking the connection with the MongoDB shell.

Uploaded by

Rajendra Acharya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views4 pages

Installing Mongodb Community Edition On Ubuntu 2. Installing The Mongodb C Driver (Libmongoc) and Bson Library (Libbson) 2.1. Starting Mongodb

The document outlines the steps to install MongoDB Community Edition on Ubuntu, including importing keys, configuring repositories, installing packages, and setting ulimit thresholds. It also covers installing the MongoDB C driver and BSON library, and describes starting MongoDB by checking the connection with the MongoDB shell.

Uploaded by

Rajendra Acharya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Installing MongoDB community Edition on Ubuntu


2. Installing the MongoDB C Driver (libmongoc) and BSON library (libbson)
2.1. Starting MongoDB

1/4
1. Installing MongoDB community Edition on Ubuntu
Import the public key used by the package management system.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv


9DA31620334BD75D9DCB49F368818C72E52529D4

Create a list file for MongoDB.

echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu


bionic/mongodb-org/4.0 multiverse" | sudo tee
/etc/apt/sources.list.d/mongodb-org-4.0.list

Reload local package database.

sudo apt-get update

Install the MongoDB packages.

sudo apt-get install -y mongodb-org

ulimit Considerations.
The following thresholds and settings are particularly important for mongod and mongos deployments:

* File sie : ulimit -f unlimited


* CPU Time : ulimit -t unlimited
* Virtual Memory : ulimit -v unlimited
* Locked-in-memory size: ulimit -l unlimited
* Open files : ulimit -n 64000
* Memory size : ulimit -m unlimited
* Processes/Threads : ulimit -u 64000

Start MongoDB

sudo service mongod stop

2. Installing the MongoDB C Driver (libmongoc) and BSON library


(libbson)

2/4
Prerequisites for libmongoc

sudo apt-get install cmake libssl-dev libsasl2-dev -y

Install libmongoc with a Package Manager

sudo apt-get install libmongoc-1.0-0 -y

Install libbson with a Package Manager

sudo apt-get install libbson-1.0 -y

3/4
2.1. Starting MongoDB

To run the examples in this tutorial, MongoDB must be installed and running on localhost on the default port,
27017. To check if it is up and running, connect to it with the MongoDB shell.

mongo --host localhost --port 27017

4/4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy