MongoDB installation (Linux + Windows)

Source: Internet
Author: User
Tags ssh secure file transfer oracle vm virtualbox vm virtualbox

(The executed commands are marked in green and the standby commands are marked in blue). Mongodb is a popular non-relational database recently.

The following describes how to install linux on a virtual machine.

Installation environment:

Virtual Machine: Oracle VM virtualbox 4.0.6

Linux: CentOS 5.6

1. Download mongodb

URL: http://www.mongodb.org/

Select the desired version

Use SSH Secure File Transfer Client to upload the File to linux (you need to ensure that the virtual machine linux System and the host system can ping each other to use the File. If the ping is not successful, you need to set the linux network settings ), here we put the mongodb-linux-x86_64-2.2.2.tgz under the linux root directory/

Enter the linux text terminal (ctrl + shift + f1 on the logon Interface ):

Enter the root directory/

Listing the files in the root directory shows that the mongodb-linux-x86_64-2.2.2.tgz is already in the directory.

Decompress

Tar zxf mongodb-linux-x86_64-2.2.2.tgz

Listing the documents under the root directory shows that the mongodb-linux-x86_64-2.2.2 directory has appeared

Before starting, we need to create a place for the database to store files. We can directly create the default data directory/data/db under the root directory (if this directory is not available, the startup will fail) (if it is created in another directory, make sure that the current account has the write permission on the data directory)

Mkdir-p/data/db

Ps1: You can use chown-R Account name: group name/data/db for directory write permission. Because the root account I use already has permission, I will not execute this command here.

  • 1
  • 2
  • 3
  • 4
  • Next Page

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.