Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2924,"date":"2019-12-27T07:27:02","date_gmt":"2019-12-27T07:27:02","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2924"},"modified":"2019-12-27T07:27:02","modified_gmt":"2019-12-27T07:27:02","slug":"install-newer-versions-of-mongodb-on-debian-7","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/install-newer-versions-of-mongodb-on-debian-7\/","title":{"rendered":"Install Newer Versions of MongoDB on Debian 7"},"content":{"rendered":"

MongoDB is a fast and powerful NoSQL database. However, Debian repositories update slowly and often contain very old versions of packages. This tutorial explains how to install latest version of MongoDB from the official MongoDB repository.<\/p>\n

At the time of writing, 3.0 was the current version of MongoDB.<\/p>\n

All commands below must be performed from the\u00a0root user<\/strong>.<\/p>\n

1. Add MongoDB public key<\/h3>\n

The following command adds the MongoDB public GPG Key to the system key ring:<\/p>\n

apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10\r\n<\/code><\/pre>\n

Debian package management tools need this key to ensure package consistency and authenticity.<\/p>\n

2. Add MongoDB repository<\/h3>\n

Create a mongodb.list file to add the MongoDB repository to the system. The following command will create this file:<\/p>\n

echo \"deb http:\/\/repo.mongodb.org\/apt\/debian \"$(lsb_release -sc)\"\/mongodb-org\/3.0 main\" | tee \/etc\/apt\/sources.list.d\/mongodb-org-3.0.list\r\n<\/code><\/pre>\n

3. Update packages<\/h3>\n

Use following command to get info about the lastest packages in repositories:<\/p>\n

apt-get update\r\n<\/code><\/pre>\n

If you are familiar with Debian, you probably already know this command.<\/p>\n

4. Install MongoDB packages<\/h3>\n

Now it’s time to install MongoDB. To install the latest stable version of MongoDB, use the following command:<\/p>\n

apt-get install -y mongodb-org\r\n<\/code><\/pre>\n

mongodb-org<\/code>\u00a0is a “metapackage” that will automatically install the four component packages:<\/p>\n

    \n
  • mongodb-org-server<\/li>\n
  • mongodb-org-mongos<\/li>\n
  • mongodb-org-shell<\/li>\n
  • mongodb-org-tools<\/li>\n<\/ul>\n

    If you need a specific version of MongoDB, you can use the following command to choose the version of each component:<\/p>\n

    apt-get install -y mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0\r\n<\/code><\/pre>\n

    In this example, I have selected version 3.0.0.<\/p>\n

    5. Start MongoDB<\/h3>\n

    After the installation finishes, MongoDB is automatically started. If you need to manually run the MongoDB server, then use the following command:<\/p>\n

    service mongod start\r\n<\/code><\/pre>\n

    To stop the mongod process, use this command:<\/p>\n

    service mongod stop\r\n<\/code><\/pre>\n

    And to restart mongod, use the following:<\/p>\n

    service mongod restart\r\n<\/code><\/pre>\n

    The MongoDB shell can be accessed by running the following command. This allows you to connect to the MongoDB server.<\/p>\n

    mongo\r\n<\/code><\/pre>\n

    When the shell is launched, you will see output in this format:<\/p>\n

    MongoDB shell version: 3.0.0\r\nconnecting to: test\r\n>\r\n<\/code><\/pre>\n

    Now you can use MongoDB on your Debian server.<\/p>\n

    \n
    \n

    Want to contribute ?<\/h2>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[110,233],"manual_kb_tag":[461],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2924"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2924"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2924\/revisions"}],"predecessor-version":[{"id":2925,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2924\/revisions\/2925"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2924"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2924"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}