MONGODB Runtime Environment
MongoDB Environment: centos-6.7-i386
MongoDB version: MongoDB 2.6.5
SSH tool: Xshell
Text editing tools: Vim and editplus++
compiling mongodb files 1. Download
Because I use Linux for 32 bit, so I found a blog
http://blog.csdn.net/liushuai_andy/article/details/19624439
Enter the Bin directory:
Build a simple MongoDB server
1. Create a folder Mongodb_simple do a stand-alone server
[Email protected] local]# mkdir mongodb_simple
2. Go to the folder, create the data directory,
[Email protected] local]# CD mongodb_simple/
[Email protected] mongodb_simple]# mkdir data
3. Create a log directory to hold the logs file
[Email protected] mongodb_simple]# mkdir log
4. Create the Conf directory and store the configuration file
[Email protected] mongodb_simple]# mkdir conf
5. Create a bin directory to store binary files
[[email protected] mongodb_simple]# mkdir bin
View: [[email protected] mongodb_simple]# ll-a
6. Copy the Mongod to the bin directory
[Email protected] mongodb_simple]# Cp/root/mongodb-linux-x86_64-3.4.2/bin/mongod bin/
7. Create the mongod.conf configuration file in the Conf directory
[Email protected] conf]# vim mongod.conf
Write the following configuration
port=12345dbpath=datalogpath=log/mongod.log# indicates starting a background process fork=true
8. Start the MONGO service
[Email protected] mongodb_simple]#/bin/mongod-f conf/mongod.conf
The above information indicates a successful start
9. View the generated files
Enter the Data directory:
[Email protected] mongodb_simple]# CD data/
[[email protected] data]# ls
Enter the log directory:
[Email protected] data]# CD. /log/
[[email protected] log]# ls
Connect to a MongoDB server
MongoDB Getting Started _mongodb installation and configuration