How To Install mongodb-server-core on Ubuntu 18.04
Introduction
In this tutorial we learn how to install mongodb-server-core
on Ubuntu 18.04.
What is mongodb-server-core
mongodb-server-core is:
MongoDB is a high-performance, open source, schema-free document-oriented data store that’s easy to deploy, manage and use. It’s network accessible, written in C++ and offers the following features:
* Collection oriented storage - easy storage of object-style data
* Full index support, including on inner objects
* Query profiling
* Replication and fail-over support
* Efficient storage of binary data including large objects (e.g. videos)
* Auto-sharding for cloud-level scalability
High performance, scalability, and reasonable depth of functionality are the goals for the project.
This package contains the database server (mongod) and sharding server/load-balancer (mongos) binaries.
There are three methods to install mongodb-server-core
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install mongodb-server-core Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install mongodb-server-core
using apt-get
by running the following command:
sudo apt-get -y install mongodb-server-core
Install mongodb-server-core Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install mongodb-server-core
using apt
by running the following command:
sudo apt -y install mongodb-server-core
Install mongodb-server-core Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install mongodb-server-core
using aptitude
by running the following command:
sudo aptitude -y install mongodb-server-core
How To Uninstall mongodb-server-core on Ubuntu 18.04
To uninstall only the mongodb-server-core
package we can use the following command:
sudo apt-get remove mongodb-server-core
Uninstall mongodb-server-core And Its Dependencies
To uninstall mongodb-server-core
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove mongodb-server-core
Remove mongodb-server-core Configurations and Data
To remove mongodb-server-core
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge mongodb-server-core
Remove mongodb-server-core configuration, data, and all of its dependencies
We can use the following command to remove mongodb-server-core
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge mongodb-server-core
References
Summary
In this tutorial we learn how to install mongodb-server-core
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.