Buy Percona ServicesBuy Now!

Installing Percona Server for MongoDB on Debian and Ubuntu

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

  • Debian 8 (“jessie”)
  • Ubuntu 14.04 LTS (Trusty Tahr)
  • Ubuntu 16.04 LTS (Xenial Xerus)
  • Ubuntu 16.10 (Yakkety Yak)
  • Ubuntu 17.04 (Zesty Zapus)

Note

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

Package Contents

percona-server-mongodb-34:
 Installs the mongo shell, import/export tools, other client utilities, server software, default configuration, and init.d scripts.
percona-server-mongodb-34-server:
 Contains the mongod server, default configuration files, and init.d scripts.
percona-server-mongodb-34-shell:
 Contains the mongo shell.
percona-server-mongodb-34-mongos:
 Contains the mongos sharded cluster query router.
percona-server-mongodb-34-tools:
 Contains Mongo tools for high-performance MongoDB fork from Percona.
percona-server-mongodb-34-dbg:
 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
    

Note

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*
      
Visit Percona Store


General Inquiries

For general inquiries, please send us your question and someone will contact you.