Try installing MongoDB on Ubuntu. Fortunately, you can use apt-get on Ubuntu. However, it is not the latest version! After sudoapt-getupdatesudoapt-getinstallmongodb is installed, the Mongodb configuration file is placed in the mongodb. conf file in/etc. The dbpath file is u
Label:MongoDB only offers a 64-bit lts (long-term support) version of Ubuntu packages. For example, 12.04 lts,14.04 lts,16.04 LTS and so on.1. Import the public key used by the package management systemUbuntu Package management Tools (for example: dpkg and apt) require resellers to use GPG keys to sign packages to ensure the consistency and authenticity of the scenario. Use the following command to import the Mong
/mongod.service file manually and write the following: [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.target5. Start, restart, and close commandssudo service mongod startsudo service mongod restartsudo service mongod stopFull Uninstall of 6
Tags: mongodb self-starter script Init.dAfter the installation of MongoDB, has been the following start, specify Dbpath,logpath, verify auth, etc../mongod--dbpath=/usr/bin/mongodb/mongodb/data--logpath=/usr/bin/mongodb/
Tags: mongdb quick StartStatement: The article is mainly from the "MongoDB actual Combat" a book, the main want to learn MongoDB knowledge through the book, deepen understanding, so write in their own blog, as a record, in the final chapter, there will be a collection of MongoDB database application Java EE Web application.The
protected] mongodb]# VI mongodb.conf
Then add the configuration information in the configuration file TXT code
port=10001
dbpath=data/
Logpath=log/mongodb.log
Logappend=true
Explanatory notes: Port=10001 "represents the port number and defaults to 27017 if not specified " dbpath=data/"Database Path" Logpath=log/mongodb.log "Log Path" Logappend=true "Log files automatically accumulate, not overwrite"
[initandlisten] 2017-05-11t16:15:42.413+0800istorage[initandlisten]exception Ininitandlisten:13597can ' Tstartwithout--journalenabledwhen journal/filesarep resent,terminating2017-05-11t16:15:42.413+0800icontrol[initandlisten] dbexit:rc:100The journal file currently exists in the journal directory, and the boot process does not start journaling, and the error is thrown because journaling is started when the database is started.Then go to the journal di
, click Install.2.2.1 add MongoDB to Environment Variables
The bin directory path of the MongoDB installation directory is as follows: C: \ Program Files \ MongoDB \ Server \ 3.0 \ bin
Add it to the environment variable path. To check whether the mongodb version is successfully added, enter Mongo-version in the command
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 import the 10gen public GPG Key:
Sudo apt-key adv -- keyserver keyserver.ubuntu.com -- recv 7F0CEB10
2. Execute Command vi/etc/apt/sources. list. d/10gen. list
Enter the following content in the insert status to obtain the 10gen target database.
Deb http://downloads-distro.mongodb.org/
package
Sudo apt-get install mongodb-10gen
Complete the installation!
Configure MongoDB
Run the command vi/etc/mongodb. conf in the/etc/directory of the configuration file.
Mongodb users are running, MongoDB database files are in, and database log files are in/var/log/
Ubuntu Knowledge Supplement:Chown-r: The same permission changes are made to all files and subdirectories in the current directory (that is, to be changed one at a time in a recursive manner)Nohup command: If you are running a process and you feel that the process will not end when you exit the account, you can use the Nohup command. This command can continue to run the process after you exit the account/close the terminal. Nohup means not to hang (no
installation process, you can set up your installation directory by tapping the custom button. Create Data Catalog MongoDB stores the data directory in the DB directory. However, this data directory is not actively created, and we need to create it after the installation is complete. Note that the data directory should be placed under the root directory (e.g. C: \ or D:\. , etc.). In this tutorial, we have Mon
Tags: var sub process hup serve PPI MongoDB file removing aboutMongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for Web applications. It is widely used for its advantages such as high performance, easy to deploy, easy to use and easy to store data. Its installation configuration is fairly simple, like the lightweight MySQL, but features tittle.
. Run the command: vi/etc/apt/sources. list. d/10gen. list (note that this command may require sudu permission. If you need sudo before vi, note the space between sudu and vi)
3. Insert the following command to 10gen. list:
Deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
4. Save and exit vi
5. Run the command: sudo apt-get update
6. Run the command: sudo apt-get install mongodb-10gen
, 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
Start Ubuntu enable auto start chkconfig
Abstract: in many cases, we need to enable certain services to run automatically at startup, such as Apache and MySQL. Or, at other times, we need to set the value of certain environment variables and modify runlevel when starting the system. At this time, we need to understand the starting process of the system.
1.
one of the most foolish steps under Ubuntu ( below are the actions under the root user ): 1. Run "apt-get install MONGO"Run "apt-get update" If the installation package is not found2. You should automatically run the Mongod program after you install it, and see if the process has started with "pgrep mongo-l ".3. Enter "MONGO"in terminal, then enter the database(over)Here's how to start your own
1. Download MongoDB, here the download version is: mongodb-linux-i686-1.8.1.tgz.tar.
Http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.1.tgz
Related reading:
Install and start MongoDB in Linux
Advanced query example in MongoDB
Recently, because of the Linux development with teammates, because not the same version of Linux (he used the arch, I use Ubuntu), and then often the configuration is not the same, as the Inittab file, and then delve into the reason:The Linux kernel starts init, and the init process ID is 1, which is the parent process of all processes, and all processes are controlled by it.Ubuntu start-up is controlled by
MongoDB installation tutorial and simple operations in Ubuntu1 MongoDB
First, let's start with a simple definition of MangoDB:
MongoDB is a distributed file storage-based database. Written in C ++. It is designed to provide scalable, high-performance data storage solutions for WEB applications.MongoDB is a product betw
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.