MongoDB is a scalable and high-performance open-source NoSQL document database. It is mainly developed using C ++. For document storage, full index support, replicable and high availability, automatic sharding, and other features. Among non-relational databases, DRDs is the most versatile and most similar to relational database document databases. The data structure is loose and is similar to the json bjson format. Specific Method: configure the package management system: 1. the Ubuntu package management tool ensures the consistency and reliability of the downloaded package. Run the following command on the console to import 10 genp
MongoDB is a scalable and high-performance open-source NoSQL document database. It is mainly developed using C ++. For document storage, full index support, replicable and high availability, automatic sharding, and other features. Among non-relational databases, DRDs is the most versatile and most similar to relational database document databases. The data structure is loose and is similar to the json bjson format.
Specific Method:
Configuration package management system:
1. the Ubuntu package management tool ensures the consistency and reliability of the downloaded package. Run the following command on the console to import the 10gen public GPG Key:
Sudo apt-key adv -- keyserver keyserver.ubuntu.com -- recv 7F0CEB10
2. Execute Command vi/etc/apt/sources. list. d/10gen. list
Enter the following content in the insert status to obtain the 10gen target database.
Deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3. Execute the following command to obtain the latest library content
Sudo apt-get update
Install MongoDB package
Sudo apt-get install mongodb-10gen
Complete the installation!
Configure MongoDB
Run the command vi/etc/mongodb. conf in the/etc/directory of the configuration file.
Mongodb users are running, MongoDB database files are in, and database log files are in/var/log/mongodb
Run MongoDB
Sudo service mongodb start
Stop MongoDB
Sudo service mongodb stop
Restart MongoDb
Sudo service mongodb restart
Install PHP extensions for MongoDB
1. Download and decompress the source code
Source package address http://pecl.php.net/get/mongo-1.4.0.tgz
2. Installation
Assume that the extracted directory is a mongo-1.4.0
Go to the mongo-1.4.0 directory and execute:
- Phpize
- ./Configure
- Make
- Make install
After the installation is successful, you will receive a message similar to the following:
Installing shared extensions:/usr/lib/php5/20121212/mongo. so (or other directory files)
In this directory, you will find mongo. so
3. Modify php configuration
Add in php. ini
Extension =/usr/lib/php5/20121212/mongo. so
For more MongoDB tutorials, see the following content::
CentOS compilation and installation of php extension http://www.linuxidc.com/Linux/2012-02/53833.htm for MongoDB and mongoDB
CentOS 6 install MongoDB with yum and configure http://www.linuxidc.com/Linux/2012-08/68196.htm on the server side
Install MongoDB2.4.3 http://www.linuxidc.com/Linux/2013-05/84227.htm in Ubuntu 13.04
MongoDB entry must read (both concepts and practices) http://www.linuxidc.com/Linux/2013-07/87105.htm
MongoDB Installation Guide http://www.linuxidc.com/Linux/2014-08/105364.htm in Ubunu 14.04
MongoDB authoritative Guide (The Definitive Guide) English version [PDF] http://www.linuxidc.com/Linux/2012-07/66735.htm
Nagios monitor MongoDB sharded cluster service practice http://www.linuxidc.com/Linux/2014-10/107826.htm
MongoDB service http://www.linuxidc.com/Linux/2014-11/108900.htm Based on CentOS 6.5 Operating System
MongoDB details: Click here
MongoDB: Click here
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-03/129048.htm