Installing MongoDB database on CentOS 7 4.0.0 latest Version

Source: Internet
Author: User
Tags mongodb

About MongoDB

MongoDB (from the English word "humongous", the Chinese meaning "huge") is an open-source database that can be applied to businesses of all sizes, industries and applications. As a database for agile development, MongoDB's data schema can be updated flexibly as the application progresses. At the same time, it also provides developers with the functionality of traditional databases: two-level indexes, a complete query system, and strict consistency, among other things.

MongoDB enables businesses to be more agile and scalable, and businesses of all sizes can use MongoDB to create new applications, increase productivity with their customers, accelerate time-to-market, and reduce enterprise costs.

MongoDB is a database designed for scalability, high performance, and high availability. It can scale from a single-server deployment to a large, complex, multi-datacenter architecture. With the advantage of memory computing, MONGODB can provide high-performance data read and write operations. MongoDB's local replication and automatic failover capabilities give your application enterprise-class reliability and operational flexibility.

The installation of MongoDB

MongoDB provides the installation package on the Linux platform, which can be downloaded from the official website. This experiment installs the latest version of MongoDB 4.0.0 on CentOS 7, the package used is: mongodb-linux-x86_64-rhel70-4.0.0.tgz

1. Unpack the Package
tar xzvf mongodb-linux-x86_64-rhel70-4.0.0.tgz -C /opt/
2. After the extracted directory moved to/usr/local/under Rename to MongoDB
cd /opt/mv mongodb-linux-x86_64-rhel70-4.0.0/ /usr/local/mongodb
3. Create data store directory and log file directory
mkdir -p /usr/local/mongodb/data/dbmkdir -p /usr/local/mongodb/logs      
4. Edit MongoDB Boot configuration file
cd /usr/local/mongodb/binvim mongodb.conf
dbpath = /usr/local/mongodb/data/db     //数据存储目录logpath = /usr/local/mongodb/logs/mongodb.log    //日志文件目录fork = true     //后台运行auth=true     bind_ip=0.0.0.0
5. The MongoDB executable file is located in the bin directory and needs to be added to the path path
vim /etc/profile
export MONGODB_HOME=/usr/local/mongodbexport PATH=$PATH:$MONGODB_HOME/bin   //末尾处添加
source /etc/profile    //重新加载环境变量
6. Start MongoDB
cd /usr/local/mongodb/binmongod -f mongodb.conf

7. Connect MongoDB and Access
/usr/local/mongodb/bin/mongo

Installing MongoDB database on CentOS 7 4.0.0 latest Version

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.