Installing Percona Server for MongoDB on Debian and Ubuntu

Percona provides .deb packages for 64-bit versions of the following distributions:

  • Debian 8 (“jessie”)
  • Debian 9 (“stretch”)
  • Ubuntu 14.04 LTS (Trusty Tahr)
  • Ubuntu 16.04 LTS (Xenial Xerus)
  • Ubuntu 17.10 (Artful Aardvark)
  • Ubuntu 18.04 LTS (Bionic Beaver)


Percona Server for MongoDB should work on other DEB-based distributions, but it is tested only on platforms listed above.

Package Contents

 Installs the mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.
 Contains the mongod server, default configuration files, and init.d scripts.
 Contains the mongo shell.
 Contains the mongos sharded cluster query router.
 Contains Mongo tools for high-performance MongoDB fork from Percona.
 Contains debug symbols for the server.

Installing from Percona Repositories

It is recommended to install Percona Server for MongoDB from official Percona repositories:

  1. Configure Percona repositories as described in Percona Software Repositories Documentation.

  2. Install the required Percona Server for MongoDB package using apt-get. For example, to install the full package, run the following:

    $ sudo apt-get install percona-server-mongodb-34

Using Percona Server for MongoDB

By default, Percona Server for MongoDB stores data files in /var/lib/mongodb/ and configuration parameters in /etc/mongod.conf.

  • Starting the service

    Percona Server for MongoDB is started automatically after installation unless it encounters errors during the installation process. You can also manually start it using the following command:

    $ sudo service mongod start
  • Confirming that service is running

    Check the service status using the following command:

    $ sudo service mongod status
  • Stopping the service

    Stop the service using the following command:

    $ sudo service mongod stop
  • Restarting the service

    Restart the service using the following command:

    $ sudo service mongod restart


On Debian 8, Ubuntu 16.04 and later versions you can also invoke all the above commands with sytemctl instead of service.

Uninstalling Percona Server for MongoDB

To uninstall Percona Server for MongoDB, remove all the installed packages. Removing packages with apt-get remove will leave the configuration and data files. Removing the packages with apt-get purge will remove all the packages with configuration files and data. Depending on your needs you can choose which command better suits you.

  1. Stop the server:

    $ sudo service mongod stop
  2. Remove the packages.

    • If you want to leave configuration and data files:

      $ sudo apt-get remove percona-server-mongodb*
    • If you want to delete configuration and data files as well as the packages:

      $ sudo apt-get purge percona-server-mongodb*

Contact Us

For free technical help, visit the Percona Community Forum.
To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.