CentOS Install mongodb3.0 binary Package

Source: Internet
Author: User
Tags install mongodb mongodb centos

Environment:

centost6.5 x64

MongoDB 3.0 1, to the official website to download this file:

Mongodb-linux-x86_64-rhel62-3.0.0.gz

2. Install MongoDB (install to/usr/local)

Unpack the installation package under the/usr/local directory;

TAR-ZXVF mongodb-linux-x86_64-3.0.2.tgz

To modify the extracted directory:

MV  mongodb-linux-x86_64-3.0.2  mongodb3.0.0

3. Create the mongodb.conf file in the bin directory under the mongodb3.0.2 directory:

    dbpath=/home/mongodb-data/db         #数据文件存放目录, usually placed in the bin directory under the installation file directory;
    Logpath=/home/mongodb-data/logs/mongodb.log      #日志文件目录, the general installation directory under the bin directory
    port=27017                     #端口默认                         # fork=true # runs MongoDB as a daemon, creating a server process 
    Nohttpinterface=true      # Turn off HTTP interface, turn off 27018 port access by default

Rebind the configuration file address and access IP for MongoDB:

/usr/local/mongodb3.0.0/bin/mongod--bind_ip localhost-f/usr/local/mongodb3.0.2/bin/mongodb.conf
4. Modify the soft rlimits limit

Vi/etc/security/limits.conf
At the end of the document add

Mongod soft Nproc 65536
mongod hard nproc 65536
mongod soft nofile 65536
mongod hard N Ofile 65536


5. Start the MONGO program, start with the parameters defined by the configuration file mongodb.conf

/usr/local/mongodb3.0.2/bin/mongod--config/usr/local/mongodb3.0.2/bin/mongodb.conf

or directly under the/usr/local/mongodb3.0.2/bin/directory:

./mongod--config mongodb.conf

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.