MongoDB Environment Installation

Source: Internet
Author: User
Tags install mongodb install mongodb linux mongodb tutorial mongodb version mongodb gui

---------------------MongoDB installation Environment---------------------1, Mongodb:http://www.mongodb.org/downloads2. MongoDB GUI visualization tool:: https://robomongo.org/3. Installing MongoDB Tutorial: https://docs.mongodb.com/getting-started/shell/installation/4. Install MongoDB Linux Community version: https://docs.mongodb.com/getting-started/shell/tutorial/install-on-linux/1. Use the package management system to import the public key:sudo apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv EA3129272. Create a MongoDB manifest file:1. Ubuntu 12.04:echo "Deb Http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.2 multiverse" | sudo tee/etc/apt/sourc Es.list.d/mongodb-org-3.2.list2. Ubuntu 14.04:echo "Deb Http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee/etc/apt/source S.list.d/mongodb-org-3.2.list3. Ubuntu 16.04echo "Deb Http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee/etc/apt/source S.list.d/mongodb-org-3.2.list 3. Reload the local package database1. Reload the local package database: sudo apt-get update2. Install the latest MongoDB stable version: sudo apt-get install-y mongodb-org3. Specify the MongoDB version, specifying the package name and version number of each component package, respectively:sudo apt-get install-y mongodb-org=3.0.4 mongodb-org-server=3.0.4 mongodb-org-shell=3.0.4 Mongodb-org-mon gos=3.0.4 mongodb-org-tools=3.0.4 5, Ubuntu16.04 's MONGO service press turn1. Sudo vi/lib/systemd/system/mongod.service:Use administrator privileges to view the specified. service file to see if the configuration information is correct[Unit]description=high-performance, Schema-free document-oriented databaseAfter=network.targetdocumentation=https://docs.mongodb.org/manual [Service]User=mongodbGroup=mongodbExecstart=/usr/bin/mongod--quiet--config/etc/mongod.conf [Install]Wantedby=multi-user.target2. Sudo vi/etc/mongod.conf:use administrator privileges to see if the configuration information for the. conf file is correct 3. If you change the user running MongoDB process, you must modify the access control permissions of the/VAR/LIB/MONGODB and/var/log/mongodb directoriessudo chown-r mongodb:mongodb/var/lib/mongodb/sudo chown-r mongodb:mongodb/var/log/mongodb/4. View current status: Sudo systemctl status Mongod5. Setup boot: sudo systemctl enable Mongod6. Cancel boot: sudo systemctl disable Mongod7. Start the Mongodb:sudo service Mongod start8, Stop Mongodb:sudo service Mongod stop9. Restart Mongodb:sudo Service Mongod restart 6, MongoDB corresponding to each parameter1, "DB": "Test"represents the current description of the database for "test". To view other databases, you can run the use Datbasename first2, "collections": 3indicates how many collections the current database has. You can see what collection the current database has by running show collections.3, "objects": 267indicates how many rows of data are in total for all collection in the current database. The displayed data is an estimate and is not very precise. 4, "avgobjsize": 623.2322097378277indicates that each row of data is size and is an estimate, in bytes5, "datasize": 16640represents the total size of all data in the current database, not the size of the owning disk. Unit is bytes6, "storagesize": 110592indicates that the current database occupies a disk size, in bytes, because MongoDB has a pre-allocated space mechanism, in order to prevent the pressure on the disk when there is a large amount of data inserted, so it will allocate more disk space beforehand. 7, "numextents": 0There's no real point .8, "Indexes": 2represents the number of System.indexes table data rows. 9, "indexsize": 53248indicates that the index occupies the disk size. Unit is bytes

MongoDB Environment Installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.