MongoDB in Linux under the slice-type installation __linux

Source: Internet
Author: User
Tags auth mongodb
MongoDB Fragmentation Server architectureThis diagram may not yet clearly describe how the architecture works.     First of all, install the Shard server multiple (not yet used, for the subsequent addition of fragments to prepare), is the real place to save data.     Again, install the configuration server, those fragments must configure the server to manage, use the database to store configuration information such as Admin and config.     Therefore, the above two kinds of servers are equipped with the database storage path, so far, the Shard server and configuration server are not linked together. Finally, you need to install a routing server, which is the server that we are actually connecting to, managing the configuration of servers and shard servers so that they are linked together.
Installation Steps Download Mongodb:http://www.mongodb.org/downloads in the Linux command console, enter:Use decompression command: Tar-zxv-f installation files, the installation files to the desktop, I am extracting to/home/erdangjiade/desktop/, modify the extracted files for MongoDB; CD into MongoDB folder, create data The Shard inside the S1 and S2 and log folders, respectively, are fragmented 1 and fragmented 2 database data storage folders, log folders.
Install Fragmentation server 1: Enter the command and press ENTER, if the information appears red box, the installation of fragmentation 1 successful.
Install Fragmentation server 2:
Install Configuration server: Note: You need to first establish a database repository for the configuration server.
To install a routing server: This is not required to configure the database storage path, which is associated with the configuration server.
Enter the admin database for the routing server and add the fragmentation to the configuration. The red box is the input command, the first one is to enter the admin database through the routing server, the second is to display the current database, and the third fourth is to add a fragment to the configuration.
Make the database fragmented to make the collection fragmented: the first is the database test fragment, and the second is to make the set in database test C1 fragmented.
Displays the fragmentation in the current routing database:
parameter resolution:--dbpath database path (data file)--directoryperdb description Each DB will create a new directory
--logpath log file path
--master designated as the main machine
--slave specified as from machine
--SOURCE Specifies the IP address of the primary machine
--pologsize command-line arguments (used with--master) configure the disk space (m) that is used to store the updated information available from the node, and if this parameter is not specified, the default size is 5% of the current available disk space (the 64-bit machine minimum is 1G). 32-bit machine is 50M).
--logappend the end of the log file add
--port Enable port number
--fork running in the background
--only specify which database to copy only
--slavedelay refers to the time interval from replication detection
--auth whether to require authentication permission logins (username and password)


-H [--help] Show this usage information
--version Show version Information
-F [--config] arg configuration file specifying additional options
--port Arg Specify port number
--BIND_IP arg local IP addresses to bind Listener-all local IPs
Bound by default
-V [--verbose] is more verbose (include multiple
verbosity e.g.-VVVVV)
--dbpath Arg (=/data/db/) directory for datafiles specify data storage directory
--quiet Quieter output Silent mode
--logpath arg file to send all output to instead of stdout specify log storage directory
--logappend APPND to LogPath instead of over-writing Specify whether the log is written in an append or overwrite way
--fork Fork Server process to create a subprocess
--CPU periodically show CPU and iowait utilization periodic display CPU and IO usage
--noauth run without security no authentication mode
--auth run with security authentication mode
--objcheck inspect client data for validity on receipt check the validity check of clients ' input data
--quota Enable DB quota management start database quota management
--quotafiles arg number of files Allower per db, requires--quota specify how many files each database allows
--appsrvpath arg root directory for the Babble app server
--nocursors diagnostic/debugging option Debug Diagnostics options
--nohints Ignore query hints ignore hit hits
--nohttpinterface Disable HTTP Interface shutdown HTTP interface, default is 28017
--noscripting Disable scripting engine shutdown script engine
--noprealloc Disable data file preallocation shutdown database File size pre-allocation
--smallfiles use a smaller default file size with a smaller defaults
--nssize Arg (=16). ns file Size (in MB) for new databases The default size of the newly-NS files
--diaglog arg 0=off 1=w 2=r 3=both 7=w+some reads provides a way to read-only, write only, read or write, or mainly write + part of the reading mode
--sysinfo Print Some diagnostic system Information printer diagnostic information
--upgrade upgrade DB If needed update database if needed
--repair Run Repair on all DBS repairs all databases
--notablescan does not allow table scans does not run a sheet scan
--syncdelay Arg (=60) seconds between disk syncs (0 for never) system synchronized Refresh Disk Time, default 60s


Replication options:
--master Master Mode primary replication mode
--slave slave mode from replication
--source Arg when slave:specify master as <server:port> specifies the address and port of the master when from
--only Arg when slave:specify a singleton to replicate specifies a single library that needs to be copied from the primary
--pairwith ARG address of the server to pair with
--arbiter arg address of arbiter server arbiter, used in main and pair
--autoresync automatically resync if slave data is stale automatic synchronization from
--oplogsize arg size limit (in MB) for OP log specifies the size of the action logs
--opidmem arg size limit (in bytes) for in memory storage of OP ids specifies the memory size of the storage action log


Sharding options:
--configsvr Declare this is a config db of a cluster specifies the configuration server in Shard
--shardsvr declare this is a shard db of a cluster specify Shard server

Reference Documentation:Build MongoDB Fragment
MongoDB Distributed Build
MongoDB Master and slave configuration

MongoDB Basic Command Reference: MongoDB basic command

Reprint please indicate the original source: http://blog.csdn.net/u012367513/article/details/40456947

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.