One of the primary MongoDB series: MongoDB installation and recommended configuration; Primary mongodb Analysis
The first time I heard about apsaradb for MongoDB, I must have heard a lot about it before I decided to learn about it. No matter what purpose you start to embark on this learning journey, I am also happy to
/usr/local/mongodb/logs/mongodb.log-- Fork
Join the firewall #Add port 27017 to the firewall (reference: CentOS6.3 compile and install memcached)
Note: the database port and the Web port, respectively 27017 and 28017, open the http://localhost:28017 in the browser, and you can see some related information.
Service iptables Restart //
queries, as well as the replication and high scalability required for real-time data storage on the site
Caching: Because of its high performance, MongoDB is also suitable as a caching layer for the information infrastructure. After a system restart, the persistent cache layer built by MongoDB avoids overloading the underlying data source
Large-size, low
://WWW.MONGODB.ORG/STATIC/PGP/SERVER-3.4.ASC
Start the Yum command to start the installation
Yum Install-y mongodb-org
If you use SELinux, you must configure SELinux to allow MongoDB to be started on a Red Hat Linux based system (Red Hat Enterprise Linux or CentOS Linux).
Vim/etc/selinux/config
#Set the value to disabled
selinux=disabled
Start MongoDB
#cent
1. New Monitoring script file:[Email protected] ~]#VI/root/mongodb-cron.SH #!/bin/SHNUM0=`PS-ef |grep-I.'Config=/var/data/mongodb/bin/mongod.config'|grep-V"grep"|WC-l ' #查看程序进程是否存活, the result is 0 for not surviving, not 0 for survival if[$NUM 0-eq0]; ThenEcho "Try start MongoDB"CD/var/data/mongodb/bin #进入程序bin目录./mong
[MongoDB] Build a mongodb sharding cluster on the windows platform (2). mongodb Cluster
In the previous blog, we talked about the main principles of Mongodb sharding clusters. In this blog, we will mainly describe how to build a sharded cluster. There are two steps to configure a sharding cluster: first, start all the
by MongoDB is 27017.V. Random startup of MongoDB as a Windows service1 Create log file to store directory D:\Program Files\mongodb\server\3.2\logs\2 Installing System ServicesPress CTRL + C to exit the Mongod process in the cmd window, and then execute the following command.Mongod--dbpath=e:\db--logpath= "D:\Program files\mo
MongoDB learning notes 01 MongoDB installation and use, mongodb learning notes
Recently, due to work needs, I began to contact mongodb, so I began to study mongodb. The first step of the study was naturally from installation and use. there will certainly be more research and
Mongodb advanced 2: mongodb aggregation and mongodb advanced AggregationIn the previous article we talked about mongodb's advanced query: http://blog.csdn.net/stronglyh/article/details/46817789
This article introduces mongodb aggregation.
I. mongodb has many aggregation fram
Tags: index XA requires action set x86 read and Write permissions God BPAinstallation :1 Download Linux installation package 2 on the official website in Linux decompression 3 will unzip the directory MV to the specified installation directoryMV mongodb-linux-x86_64-rhel70-3.6. 5//usr/local/mongodb4 CD to the bin directory, execute the following command to add the environment variable:Export path= $PATH:/usr/local/
Mongodb database adding System Service tutorial, mongodb System Service 1. Create the mongod file in the/etc/init. d directory and grant the correct permissions:
root@ubuntu:/etc/init.d# touch mongodroot@ubuntu:/etc/init.d# chmod 755 mongod
2. Edit the mongod File
#!/bin/sh### BEGIN INIT INFO# Provides: mongod# Required-Start: $local_fs $syslog# Required-Stop: $local_fs $syslog# Default-Start: 2
-mongos-2.6.1 mongodb-org-tools-2.6.1 3.3 To avoid the unintended escalation
/etc/yum.conf->
Exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos, Mongodb-org-tools
4. Run MongoDBNote the
[MongoDB] mongodb sharded cluster (iii) on windows platform, mongodb Cluster
In the previous two blogs, we elaborated on the working principle and building process of the sharded cluster. In this blog, we will analyze the testing results of the sharded cluster;
First, check the status of the sharded cluster. We can see that replica set A and replica Set B are nor
C ++ language centerClick Open Link
C ++ driver download
Click Open Link
Install scons: CD build/sconspython setup. py install
Install PCRE and scons [root @:~ /Mongo-cxx-driver-v1.8] # scons after a period of formation, generate lib1_client. So: [root @:~ /Mongo-cxx-driver-v1.8] # lsauthtest clienttest firstexample lib+client. A license.txt sconstruct whereexampleclient config. Log httpclienttest lib+client. So Mongo secondexample
Copy to [root @: ~ in/usr/local/lib @:~ /Mongo-cxx-driver-v1
:
Security
KeyFile: "/usr/local/mongodb/keyfile"
Clusterauthmode: "KeyFile"
Authorization: "Enabled"
The second way:
Auth=true
KeyFile =/usr/local/mongodb/keyfile
The startup script uses the following code (comments that are original and commented out before enabled)
/usr/local/mongodb
success
of the installation: in the CMD terminal input: MONGO--version or Mongod--version, can see the version is good, indicating the installation success
if the terminal input MONGO--version Hint cannot find the command, be sure to see if there is no configuration MongoDB environment variables, and configure the environment variables must remember to restart CMD
problems existing in Window7 instal
Tags: MongoDB install mongodb source Installation ---1. Turn off Numa in procRpm-qa | grep numactl Yum Install-y Numactl # echo 0 >/proc/sys/vm/zone_reclaim_mode# sysctl-w Vm.zone_reclaim_mode=0 ---2. Modify the maximum number of connections #vi/etc/security/limits.conf * Soft Nofile 25000* Hard Nofile 25000 ---3. Turn off the firewall Chkconfig--level 123456 iptables off Service Iptables Stop
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.