MongoDB installation in Ubuntu environment (take mongodb3.2 as an example)

Source: Internet
Author: User

Download the software here will not say, it is best to download the official version.


Extract

sudo tar-zxvf/usr/test/soft/mongodb-linux-x86_64-ubuntu1404-3.2.6.tgz-c/usr/test


Move

sudo mv/usr/test/mongodb-linux-x86_64-ubuntu1404-3.2.6/usr/test/mongodb3.2


New Catalog

mkdir-p/usr/test/mongodb3.2/data/db //db Directory

Mkdir/usr/test/mongodb3.2/log //store log directory


Add/usr/test/mongodb3.2/mongod.conf configuration file, adding the following content

dbpath=/usr/test/mongodb3.2/data/db
Logpath=/usr/test/mongodb3.2/log/mongodb.log
Logappend=true
Fork=true


Start MongoDB
/usr/test/mongodb3.2/bin/mongod--config/usr/test/mongodb3.2/mongod.conf



Now it's time to get into MongoDB operation.

Enter MongoDB
/usr/jiankongyun/mongodb3.2/bin/mongo
> Show DBS

> Use Test

> Show Collections

> Db. Test. Find ()

> Exit


Configure MongoDB Auto-start, edit the/etc/rc.local file, add the following:
/usr/test/mongodb3.2/bin/mongod--config/usr/test/mongodb3.2/mongod.conf

The deployment of NUTCH+MONGODB data here is complete. In the Linux operating system can also encounter such a problem, as long as the heart to carefully review the error prompt has log view log, the problem can always be resolved.

Here to share a very good site, a web crawling site, monitoring the cloud-the first domestic cloud-based Internet content monitoring platform Http://www.jiankongyun.met


MongoDB installation in Ubuntu environment (take mongodb3.2 as an example)

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.