Linux under MongoDB installation and configuration

Source: Internet
Author: User
Tags openssl

Install MongoDB3.0.3 on CentOS6


Version: Mongodb-linux-x86_64-rhel62-3.0.5.tgz


Installing OpenSSL

#yum install-y Openssl-devel openssl-y


1. Download MongoDB

# wget Https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.0.5.tgz



2. Start the installation

MongoDB default installed database directory/data/db, default port 27017


# mkdir-p/home/www/

# tar zxvf mongodb-linux-x86_64-rhel62-3.0.5.tgz-c/home/

# Mv/home/mongodb-linux-x86_64-rhel62-3.0.5/home/mongodb

# Cd/home/mongodb

# mkdir-p etc

# MKDIR-P Data

# mkdir-p Logs


Custom configuration Files

# vi/home/mongodb/etc/mongodb.conf


port=20000

Dbpath=. /data

Logpath=. /logs/mongodb.log

Logappend=false

Fork=true

maxconns=5000

bind_ip=127.0.0.1,192.168.2.128

Noauth=true

Nohttpinterface=true

Rest=true#启用WEB控制台, the default port for the Web console is 28017



Start:

#cd/home/mongodb/bin

#./mongod-f. /etc/mongodb.conf--smallfiles


#netstat-ntpl#查看mongodb是否启动


Finally, the MongoDB port is added to the iptables



Randomly start MongoDB as a Linux service

# vi/etc/rc.local

Add the following line of code to it

/home/mongodb/bin/mongod--dbpath=/home/mongodb/data--logpath=/home/mongodb/logs/mongodb.log


Linux under MongoDB installation and configuration

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.