Install MongoDB In Ubuntu. If it is a desktop environment, switch to the root user in the console. Because the Default User in Ubuntu Desktop version does not have the highest level of permissions
Install MongoDB In Ubuntu. If it is a desktop environment, switch to the root user in the console. Because the Default User in Ubuntu Desktop version does not have the highest level of permissions
MongoDB is a scalable and high-performance open-source NoSQL document database. It is mainly developed using C ++. For document storage, full index support, replicable and high availability, automatic sharding, and other features. Among non-relational databases, DRDs is the most versatile and most similar to relational database document databases. The data structure is loose and is similar to the json bjson format.
Install MongoDB In Ubuntu. If it is a desktop environment, switch to the root user in the console. Because the Default User in Ubuntu Desktop version does not have the highest level of permissions, switch to the root user in the console.
Specific Method:
In the Ubuntu Desktop Environment, click ctrl + alt + t to open the console, enter the command: sudo passwd root, and press enter to prompt "enter a new unix Password ", enter the password to generate a new root password, and then enter it again. Then enterSuPress enter to enter the password you just set. For example:
Configuration package management system:
1. the Ubuntu package management tool ensures the consistency and reliability of the downloaded package. Run the following command on the console to import10gen public GPG Key:
Sudo apt-key adv -- keyserver keyserver.ubuntu.com -- recv 7F0CEB10
2. Run the commandVi/etc/apt/sources. list. d/10gen. list
Enter the following content in the insert status to obtain the 10gen target database.
Deb dist 10gen
3. Execute the following command to obtain the latest library content
Sudo apt-get update
Install MongoDB package
Sudo apt-get install mongodb-10gen
Complete the installation!
Configure MongoDB
Run the command in the/etc/directory of the configuration file.Vi/etc/mongodb. conf
For mongodb users /Var/lib/mongodb In/Var/log/mongodb
Run MongoDB
Sudo service mongodb start
Stop MongoDB
Sudo service mongodb stop
Restart MongoDb
Sudo service mongodb restart
For more information about Ubuntu, see the Ubuntu special page? Tid = 2