Guide document on MongoDB database installation in Linux environment 1. Create and install user NA annotation: Generally, we create a mongodb user, which allows O & M to help create 2. Upload
Guide document for installing MongoDB databases in Linux environment 1. Create and install user N/A annotation: We generally create A mongodb user, which allows O & M to help create 2. Upload
Guide on installing MongoDB databases in Linux
1. Create an installer
N/
Note: We generally create a mongodb user. This allows O & M to help create
2. Upload mongodb data software.
N/
Annotation: Using mongodb users to upload software; -- mongodb-linux-x86_64-2.4.12.tgz
3. Unzip the installation package
Tar-zxvf mongodb-linux-x86_64-2.4.12.tgz -- unzip the installation package
Music mongodb-linux-x86_64-2.4.12 mongodb-change mongodb-linux-x86_64-2.4.12 to mongodb
4. Create a data folder and a log folder;
Cd mongodb
Mkdir date
Mkdir log
Annotation: used to store data and logs respectively;
5. Create the mongodb. conf file.
Cd $ HOME
The content of the new mongodb. conf file is as follows:
# Port = 10000
Dbpath =/home/mongodb/data/
Logpath =/home/mongodb/log/mongodb. log
Logappend = true
Fork = true
Note: The function here is to facilitate the start of the mongodb service. You can directly use mongod-f mongodb. conf to start
6. Configure Environment Variables
Cd $ HOME
Add two lines after file. bash_profile
Export MONGODB_HOME =/home/mongodb
Export PATH = $ MONGODB_HOME/bin: $ PATH
Annotation: 1. re-open a login interface; or load the file. bash_profile; source. bash_profile
2. You do not need to add a full path when executing the command. You just need to press mongod/mongo.
7. Start the service
Mongod-f mongodb. conf
OK; mongodb is so simple; it can be done in minutes.
------------------------------------------ Split line ------------------------------------------
CentOS 6 install MongoDB and server configuration using yum
Install MongoDB2.4.3 in Ubuntu 13.04
MongoDB beginners must read (both concepts and practices)
MongoDB Installation Guide for Ubunu 14.04
MongoDB authoritative Guide (The Definitive Guide) in English [PDF]
Nagios monitoring MongoDB sharded cluster service practice
Build MongoDB Service Based on CentOS 6.5 Operating System
MongoDB details: click here
MongoDB: click here