The installation of Mongod in RS cluster is the same as a single machine, but the configuration file is slightly different,Standalone installation path Linux under MongoDB 3.2.5 installationThe following is the RS cluster configuration file:Systemlog:Destination:filePath:/home/mongodb/log1/mongod.log # #log的路径Logappend:trueStorageJournalEnabled:trueDbPath:/home/
Recently using the thinkphp connection MongoDB database for the pruning, before using the PHP itself to support the connection to MongoDB, the following is the way I installed the MongoDB extension of PHPWget-c http://pecl.php.net/get/mongo-1.3.6.tgzTar zxvf mongo-1.3.6.tgz#UnzipCD mongo-1.3.6/usr/local/php/bin/phpize./configure--with-php-config=/usr/local/php/bi
Tags: style blog http color io ar strong for file
Download and unzip the MongoDB file. Put the extracted files under/opt/(store directory to install their own habits)# wget Http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.4.tgz# tar-zxvfmongodb-linux-x86_64-2.0.4
Document Purposein the Install Mongodb application on Linux system and set basic security permissions to ensure database securityBasic KnowledgeMongoDB is based on a database for Distributed file storage . Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications. MongoDB is a product between a re
1. Go to the official website to download the installation package2. Unzip the TAR packageTAR-ZXVF filename3. Move the path and enter the pathMV mongodb-linux-x86_64-3.0.6//usr/local/mongodb4. Configure Environment variablesExport Path=/usr/local/mongodb/bin:$PATH5. Create the default startup directory for the databaseMkdir-p/data/db6. Start the server./mongod7
before inserting--drop drop each collection before import--oplogreplay Replay oplog for Point-in-time restore--oploglimit Arg include Oplog entries before the provided Timestamp (seconds[:ordinal]) during the Oplog replay; the ordinal value is optional--keepindexversion don ' t upgrade indexes to newest version--nooptionsrestore don ' t restore collection options--noindexrestore don ' t restore indexes--w Arg (=0) Minimum number of replicas per write
Actual operation:MongoDB B
followed by a parameter, 0 means the display is not displayed in the query Results 1 representsFor example: View only name and gender:Db.stu.find ({},{name:1, gender:1})//_id is displayed by default, if it is not displayed _id need special designation//projection set to 1 except _id other parameters are displayed by defaultdo not show _id:db.stu.find ({},{_id:0,name:1})3.8 Sorts sort ():db. Collection. Find (). sort ({field 1:1, field 2:-1})//Specify field sort, 1 for ascending, 1 for descendin
Tags: http io os ar for SP file div onThere are a lot of documents to install, you can refer to this article:
http://www.mkyong.com/mongodb/how-to-install-mongodb-on-mac-os-x/2 questions you may encounter after installation.
1. Let Mongod run the command in the background to start MONGO Mongod has a parameter--fork can make MONGO run in the background, but you must also set the--logpath parameter to
Label:1. Install the MONGBODB installation package (open source free yo) Under the Mac Brew install MongoDB can be installed to wait a while, about 200M 2. CD to Mongbodb folder-if installed with homebrew /usr/local/cellar/mongodb/(version number) 3. Create a Folder mkdir data mkdir Log mkdir conf 4. Writing the startup file CD conf Vim mongod.conf Port = 54321 DBPath = Data LogPath = Log/mongod.log Fork =
A new requirement was received in the previous two days to monitor the maximum number of MongoDB connections, memory usage, etc. in the Linux shell script.
But I do not understand the Linux Shel, just a few simple common Linux operations, as long as a wild search, and finally many attempts to finally get these values.
1. installation environment:
Oracle Linux 5.9
2. Download and install:
For how to install the yum command in Linux, see:
Check whether the yum source has mongodb:
[Root @ bakdbserver ~] # Yum info mongo-10gen
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
You can use up2date -- register to register.
ULN support will be disabled.
Error
Tags: div help style open process link targe Ann SuccessOne, download MongoDB file (1) Various versions: Https://www.mongodb.org/dl/linux/x86_64 (2) Baidu cloud Download Link: Https://pan.baidu.com/s/1JEK8ybzdyeia4olc96tR-A Password: bg66 Second, unzip the file (upload to the Linux process omitted) Third, through the command line:
CD
Linux limits mongodb memory usage for multiple instances: you can bind a cpu to prevent mutual interference between multiple instances. The memory of www.2cto. commongodb can also be restricted to the master to prevent all memory from being occupied by one instance. # Tudou@ B2C .xiaomi.com [plain] ulimit-s4096 amp ;...
Linux limits
1, download MongoDB, without compiling (if HTTPS does not, can be replaced by HTTP)wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgzTAR-ZXVF mongodb-linux-x86_64-2.6.1.tgzMV
, to do a certain IP access frequency limit, to avoid being reasonable use of attacks.Third, appendixRecommend a website: zooomeye, Zhong Eye, is a search engine for cyberspace. His crawler is dedicated to scanning the server on the network, for example, he got an IP, began to detect which ports on the IP open, using some methods to obtain important open services information.With him, you can make a simple vulnerability scan of your own server (provided that he has updated your server's informat
1,MONGODB introduction;MongoDB is a high-performance, open-source, modeless document-based database that is a popular one in the current NoSQL database. It can be used in many scenarios to replace the traditional relational database or key/value storage methods. MONGO using C + + developmentCharacteristics:
High performance, easy to deploy, easy to use, easy to store data. The main features are:
Tags: GPO inux use command log data using Enter CommSome friends say you can close mongodb with the following command:Killall MongoDB#or-9 MONGO-pid The above method does turn MongoDB off, but it's not the right thing to do, and MongoDB provides a command to shut down the database:First you need to go into the
Tags: LAN for installation art database settings restart IMG MongodMongoDB Start Stop method The official website installs the introduction to still have the way that starts to stop 1 start sudo service Mongod start 2 stop sudo service Mongod stop 3 restart sudo service mongod restart 4 Viewing status sudo service Mongod status or view the process Ps-ef | grep Mongod or view the port number status NETSTAT-LANP | grep 27017 5 connections Mongo 6 Viewing the database configuration Less/etc/m
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.