MongoDB is an open-source database project written by C ++ Based on Distributed File storage. It aims to provide a high-performance data storage solution that can be expanded for WEB applications. The following describes how to install and how to get started. Download to the official website mongodb.org to download the latest stable version, is currently mongodb-linux-i686-1.8.0.tgz
MongoDB is an open-source database project written by C ++ Based on Distributed File storage. It aims to provide a high-performance data storage solution that can be expanded for WEB applications. The following describes how to install and how to get started. Download to the official http://mongodb.org to download the latest stable version, is currently mongodb-linux-i686-1.8.0.tgz
MongoDB is an open-source database project written by C ++ Based on Distributed File storage. It aims to provide a high-performance data storage solution that can be expanded for WEB applications.
The following describes how to install and how to get started.
Download
Go to the official http://mongodb.org to download the latest stable version, is currently mongodb-linux-i686-1.8.0.tgz
Extract
mv mongodb-linux-i686-1.8.0.tgz /usr/local/cd /usr/localtar xvf mongodb-linux-i686-1.8.0.tgzmv mongodb-linux-i686-1.8.0 mondodbrm -y mongodb-linux-i686-1.8.0.tgz
Run
You need to create a directory for storing data (/data/db/by default), create a directory and start it:
mkdir -p /data/db//usr/local/mongodb/bin/mongod
If you want to use a specified directory to store data, add the-dbpath option:
/usr/local/mongodb/bin/mongod --dbpath /path/to/data/dir
Common Parameters
-- Port: Specifies the port. Default Value: 27017 -- dbpath: Specifies the data directory. Default Value:/data/db -- logpath: Specifies the Log Path, if not specified, the log is output to the command line. -- Logappend: When a log is created, the original file is overwritten. You can use this option to append the log. -- Fork: Run MongoDB -- rest as a daemon: enables the MongoDB rest api. You can use the default port + 1000 to manage the database. -- Config: Specify the configuration file
Use JavaScript Shell tools
The default link is the test database.
/usr/local/mongodb/bin/mongoMongoDB shell version: 1.8.0connecting to: test>
MongoDB Manual
Http://www.mongodb.org/display/DOCS/Manual
Original article address: Installing MongoDB in Linux and getting started. Thank you for sharing it with me.