The official MongoDB is actually green-free, http://www.mongodb.org/downloadsDefault no configuration file, build one yourself:VI mongodb.conf:
The code is as follows
Copy Code
Dbpath=/home/mongodataFork=trueAuth=trueLogpath=/home/server/mongodb-linux-i686-2.4.3/log.logLogappend=trueJournal=trueQuiet=true
Start:
has a user table, each database has a user table, but seemingly alone in the user table set up users can not directly access MongoDB, must go to the admin library inside Auth can
Second, Linux installation configuration
The MOGODB is installed in the/usr/local/src/mongodb/directory, the database is in/data/mongodb/db,
Label:The first two days have received a new requirement to monitor the maximum number of MongoDB connections, memory usage, etc. in a Linux shell script.But I do not know about the Linux Shel, but will be some simple common Linux operation, as long as a crazy search, eventually try to finally get these values.The step
This article will describe my installation MongoDB expansion process, we can have a little reference
Installation Environment
Linux Environment: CentOS 6.5Apache Version: 2.4PHP Version: 5.4.3MongoDB version: 2.6.5
First, download mongo-php extended installation package
Can download from GitHub, address is https://github.com/mongodb/mongo-php-driver-legacy
D
One: Problem description
These several times perform MongoDB initialization scripts and discover a problem:
When you upload a script from Windows to Linux, the error occurs when you execute it.
Such as:
Mongo-u root-p mongo123 Admin--port 8000
There are many errors in the Initdata-bmis.log file:
Syntaxerror:unexpected token illegal But the direct copy paste script content executes on the command li
1. Connect to the Linux system first.2. Download the appropriate MongoDB install compression package to the MongoDB website.Download page: Https://www.mongodb.org/downloads#production.Here i download the Linux 64-bit legacy: https://fastdl.mongodb.org/linux/
1. On the official website https://www.mongodb.org/dl/linux/x86_64 download the corresponding installation compression package, I use 3.2.5, we recommend this version, the higher the version, there may be other unknown problems, such as the need to glibc high version, throughLl/lib64/libc.so.6 can view the native version of/lib64/libc.so.6-libc-2.17.so, installed once.2. Put the compressed package in the/usr/download directory, enter the download dire
Python monitors linux memory and writes it to mongodb and pythonmongodb
(You need to install psutil to obtain server resources and pymongo driver) # pip install psutil
# Pip install pymongo
# Vim memory_monitory.py
The file content is as follows:
#! /Usr/bin/env python#-*-Coding: UTF-8 -*-Import psutilImport socketImport timeFrom pymongo import MongoClientMongodbIp = '192. 168.200.112'Export dbport = 27017
Tags: linux centos6 mongodb NoSQLMongo DB is a non-relational database (NOSQL) that is currently very popular in the IT industry, and its flexible data storage methods are favored by current it practitioners. Mongo db is a good way to implement object-oriented thinking, in Mongo db, each record is a document object. The biggest advantage of Mongo DB is that all data persistence requires no developers to wri
Installation
1> Set MongoDB Directory
Cd/home/apps: CentOS Create directory command Mkdir/home/apps
2> Download MongoDB
Curl-o http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.6.tgz
Either download it or copy it directly or upload it to the specified directory with
First step, install MongoDB to each server
Prepare more than 3 MongoDB servers and do the following on each platform
1, download MongoDB, extract and move to/usr/local/mongodb directory(if wget is not installed, please yum install wget or apt-get install wget)It is possible to download a Web server from a local area
Tags: run interactive--needed BPA files OOB nal httpMongoDB provides a 64-bit installation package for each Linux distribution, and you can download the installation package on the website. : https://www.mongodb.com/download-center#community Download the installation package and unzip the tgz(the installation on 64-bit Linux is shown below). Curl-o https://fastdl.mongodb.org/
availability.Automatic Horizontal expansion:Horizontal scaling is the kernel feature of MongoDB.Automatically share distributed data on a clusterReplica sets can provide final consistency reading for applications with low latency and high throughput.Installation:0Environment[Root@host2 ~]# Uname-aLinux host2 2.6.32-504.3.3.el6.x86_64 #1 SMP Wed Dec 01:55:02 UTC 2014 x86_64 x86_64 x86_64 gnu/linux[Root@host2 ~]# Cat/etc/issueCentOS Release 6.5 (Final)
Description:
There are two installed MongoDB database server, now need to set a main library, another set to from the library, to achieve master-slave synchronization.
Operating System: CentOS 7.0 64-bit
MongoDB database version:mongodb-linux-x86_64-2.6.5
preparatory work: MongoDB Database Installation
Please refer to:
Tags: new repo mon Mongo MongoDB elf sel baseurl EPOConfigure the package Management system (yum).Create a /etc/yum.repos.d/mongodb-org-3.2.repo file so this you can install MongoDB directly, using yum . Changed in version 3.0:mongodb Linux packages is in a new repository be
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.