Install MongoDB on Ubuntu 10.04

Source: Internet
Author: User
Tags install mongodb

MongoDB is a scalable and high-performance next-generation database. Data in MongoDB is stored as documents, so that complex relationships can be expressed in a single data object. A document may consist of the following parts: an independent basic type attribute, an embedded document, or an array of documents.

This flexibility allows developers to model a large number of problems in an easy-to-manage and flexible manner, without the need to scatter data into different data tables. When data cannot be constructed into a separate document, MongoDB has the concept of "DBRef", which is a pointer from one document attribute to another.

It is flexible to retrieve and query data from MongoDB databases-you can dynamically query documents based on any attributes in the main document, document, any embedded document, or any document in the array. You can use the dot symbol to access embedded documents.

Because Ubuntu 10.04 already has the MongoDB 1.2.2 source, you can directly use apt-get to install it:

Sudo apt-get install mongodb

When installing MongoDB, the system will install many MongoDB dependent packages. After the installation is complete, run MongoDB and a prompt will be displayed:

Mongod: error while loading shared libraries: libjavasjs. so: cannot open shared object file: No such file or directory

Solution:

Sudo apt-get install xulrunner-dev

Find the libjavasjs. so file:

Find/usr/lib | grep lib1_js

You can see:

/Usr/lib/xulrunner-devel-1.9.2.8/sdk/lib/lib1_js. so

/Usr/lib/xulrunner-1.9.2.8/libw.js. so

/Usr/lib/firefox-3.6.8/libw.js. so

Link the Library:

Sudo ln-s/usr/lib/xulrunner-1.9.2.8/lib1_js. so/usr/lib

Restart the mongodb service:

Sudo service mongodb start

Check whether the service is started:

Ps aux | grep rjd

Install pymongo

Because pymongo is installed in easy_install mode, you need to install setuptools first:

Sudo apt-get install python-setuptools

After installation, run the following command:

Sudo easy_install pymongo

Related reading: Precautions for installing MongoDB in Ubuntu 10.04

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.