Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Different versions of MongoDB achieve master-slave replication     - RHEL7.0 configuration CD-ROM to the local YUM (Linux)

- Linux file system data file deletion problem space is not freed (Database)

- Git 2.5 increase in the working tree, triangle improved workflow performance (Linux)

- Repair Raspbian Encountered a section with no Package (Linux)

- JavaScript original values and complex values (Programming)

- To use Android RecyclerView (Programming)

- CentOS 7 Configure logging (VirtualBox) (Linux)

- A new method for Linux hidden files (Linux)

- How to Install Cantata MPD 1.3.3 for Ubuntu and Derived Version Users (Linux)

- Ubuntu install Eclipse for C / C ++ and related configuration (Linux)

- for (int a: i) the use of the Java programming (Programming)

- RealVNC Server 5.2.3 Installation and Configuration In Fedora (Server)

- Ten SCP transfer command example (Linux)

- Java gets the current system time System.currentTimeMillis () (Programming)

- Examples of Python any parameters (Programming)

- CentOS 6.4 under PXE + Kickstart unattended operating system installation (Programming)

- Go Languages Reviews (Programming)

- How to install Go1.5 source development environment on Mac (Server)

- How wifi-linux AP signal strength detection (Linux)

- CentOS 6.5 installation and simple configuration Nginx (Server)

 
         
  Different versions of MongoDB achieve master-slave replication
     
  Add Date : 2018-11-21      
         
       
         
  MongoDB has a major feature is to copy, copy a variety of forms, including, master-slave replication is more commonly used.

Master-slave replication works: First, there must be two or more servers, one of which is the master node, responsible for handling client requests, the other is from the node, the master node is responsible for mapping data. Master record in all of its operations on the implementation of the operations acquired from node periodically poll the master node, then perform these operations. Since the implementation of the same operation from the node and the master node, the node will be able to keep pace with the data from the master node.

Combat explain MongoDB to build and master-slave replication, because only one server, it can only be realized by changing the port number from MongoDB master, rather than through multiple server implementation. In fact, the principle is the same - just do not particularly meaningful ~

Has been previously installed a version of MongoDB (2.6.11), now that mongodb has been updated to 3.0.6, then from the library will use specially 3.0.6, because it is testing purposes, not Guannameduo ~
 
installation

mongodb Download

Download mongodb3.0.6 executable file package, and extract, the binaries on /usr/local/mongo3.0.6 directory
 
Configuration
 
Main Library Configuration

# Mongod.conf
 
#where to log
logpath = / var / log / mongodb / mongod-27017.log
 
logappend = true
 
# Fork and run in background
fork = true
 
port = 27017
 
# Dbpath = / var / lib / mongo
dbpath = / data / mongodb / mongo-27017
 
# Location of pidfile
pidfilepath = / var / run / mongodb / mongod-27017.pid
 
bind_ip = 127.0.0.1,192.168.56.61
 
# Noauth = true
 
# Ignore query hints
# Nohints = true
 
# Disable the HTTP interface (Defaults to localhost: 27017).
nohttpinterface = false
rest = true
 
master = true
 
From the Library Configuration

# Mongod.conf
 
#where to log
logpath = / var / log / mongodb / mongod-27018.log
 
logappend = true
 
# Fork and run in background
fork = true
 
port = 27018
 
# Dbpath = / var / lib / mongo
dbpath = / data / mongodb / mongo-27018
 
# Location of pidfile
pidfilepath = / var / run / mongodb / mongod-27018.pid
 
# Listen to local interface only. Comment out to listen on all interfaces.
bind_ip = 127.0.0.1,192.168.56.61
 
# Noauth = true
 
# Ignore query hints
# Nohints = true
 
# Disable the HTTP interface (Defaults to localhost: 27018).
nohttpinterface = false
rest = true
 
slave = true
source = 127.0.0.1:27017
 
start up

# Start the main library
/usr/local/mongo2.6.11/mongod -f /etc/mongod/mongod-27017.conf
 
Start from the library #
/usr/local/mongo3.0.6/mongod -f /etc/mongod/mongod-27018.conf
 
 
Authenticate

  Different versions of mongodb start auth mode can be achieved by the following method

  1. First of all master mode is set unauth from mongodb

  2. Add a master account, so that slave will automatically sync the account

  3. All the main open auth mode from mongodb
     
         
       
         
  More:      
 
- Compression software on a simple comparison of zip and gz (Linux)
- APT-GET commonly used Linux command (Linux)
- GitLab installation configuration notes (Linux)
- Ten linux version of the system (Linux)
- Java object serialization and deserialization (Programming)
- Java implementation chain store binary tree (Programming)
- To install Docker under Ubuntu 15.04 (Linux)
- Read the official GNU Make manual one (chapter 1-2) (Programming)
- Ubuntu users to install Xtreme Download Manager (Linux)
- Grub2 Boots the openSUSE installation image (Linux)
- Depth understanding of DB2 table space (Tablespace) (Database)
- The need to avoid a gap of InnoDB lock (Database)
- VMware virtual machine to install CentOS 6.2 (Linux)
- Household use Linux Security (Linux)
- Linux Defensive / mitigate DDOS attacks (Linux)
- Android shutdown (reboot) process (Programming)
- Oracle index visible and hidden (visible / invisible) (Database)
- Oracle11g Trigger Debugging Record Error: PLS-00201: identifier SYS.DBMS_SYSTEM 'must be declared (Database)
- How to test your MongoDB application upgrade? (Database)
- Linux firewall to prevent external network attacks (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.