How To Install MongoDB on CentOS 6
How To Install MongoDB on CentOS 6
Category: Technical Support | Tags: auto-sharding, centos, centos 6, core managed, dynamic schemas, high availability, mongodb, nosql, replication
MongoDB is a NoSQL database intended for storing large amounts of data in document-oriented storage with dynamic schemas. NoSQL refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding.
- These instructions are intended for installing MongoDB on a single CentOS 6 node.
- I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
vim /etc/yum.repos.d/mongodb.repo
Option A: If you are running a 64-bit system, add the following information to the file you’ve created, using <reference_page_text>i to insert:
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
Then exit and save the file with the command <reference_page_text>:wq . You should see an output very similar to the following image:
Option B: If you are running a 32-bit system, add the following information to the file you’ve created, using <reference_page_text>i to insert:
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
gpgcheck=0
enabled=1
Then exit and save the file with the command <reference_page_text>:wq .
At this point, installing MongoDB is as simple as running just one command:
yum install mongo-10gen mongo-10gen-server
When prompted <reference_page_text>Is this ok [y/N]: , simply type <reference_page_text>y and then hit the enter key. You should see an output very similar to the following image:
Start-Up MongoDB
service mongod start
You should see an output very similar to the following image:
Check MongoDB Service Status
service mongod status
Summary List of Status Statistics
mongostat
Enter the MongoDB Command Line
mongo
You should see an output very similar to the following image:
By default, running this command will look for a MongoDB server listening on port 27017 on the localhost interface.
If you’d like to connect to a MongoDB server running on a different port, then use the –port option. For example, if you wanted to connect to a local MongoDB server listening on port 22222, then you’d issue the following command:
mongo --port 22222
Shutdown MongoDB
service mongod stop
There are many, many more things we could say about MongoDB, but those will be detailed in follow-up articles in the Liquid Web Knowledge Base! Look for articles on: <reference_page_text>How To Install MongoDB and Run a Multi-Node Cluster on CentOS 6 , <reference_page_text>Recommended Production Settings for MongoDB on CentOS 6 and more!
How To Install MongoDB on CentOS 6的更多相关文章
- Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux
Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux¶ Overview Use this tutorial t ...
- 转: How to Install MongoDB 3.2 on CentOS/RHEL & Fedora (简单易懂)
from: http://tecadmin.net/install-mongodb-on-centos-rhel-and-fedora/ MongoDB (named from “huMONGOus ...
- How To Install Java on CentOS and Fedora
PostedDecember 4, 2014 453.8kviews JAVA CENTOS FEDORA Introduction This tutorial will show you how ...
- Install MongoDB driver for PHP on XAMPP for Mac OSX
试了不少方法,最后还是这个最有效. [转自:http://thatsimplecode.com/install-mongodb-driver-for-php-on-xampp-for-mac-osx] ...
- Install Redis on CentOS 6.4--转
Install Redis on CentOS 6.4 source:http://thoughts.z-dev.org/2013/05/27/install-redis-on-centos-6-4/ ...
- Install ssdb-rocks on CentOS 6
Install ssdb-rocks on CentOS 6 C.C. 发表于 2014年08月10日 20:14 | Hits: 649 为了优化节操精选的弹幕系统,打算更换到Facebook的R ...
- Steps to Install Hadoop on CentOS/RHEL 6---reference
http://tecadmin.net/steps-to-install-hadoop-on-centosrhel-6/# The Apache Hadoop software library is ...
- Install MongoDB on Windows
Overview Use this tutorial to install MongoDB on a Windows systems. PLATFORM SUPPORT Starting in ver ...
- Install MongoDB on Windows (Windows下安装MongoDB)
Install MongoDB on Windows Overview Use this tutorial to install MongoDB on a Windows systems. PLATF ...
随机推荐
- js之自定义右键菜单
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- BZOJ4974:[Lydsy1708月赛]字符串大师(逆模拟KMP)
题目描述 一个串T是S的循环节,当且仅当存在正整数k,使得S是T k Tk (即T重复k次)的前缀,比如abcd是abcdabcdab的循环节.给定一个长度为n的仅由小写字符构成的字符串S,请对于每 ...
- 每天一个linux命令(文件操作):【转载】whiereis命令
whereis命令只能用于程序名的搜索,而且只搜索二进制文件(参数-b).man说明文件(参数-m)和源代码文件(参数-s).如果省略参数,则返回所有信息. 和find相比,whereis查找的速度非 ...
- log4j 格式详解
### 设置### log4j.rootLogger = debug,stdout,D,E ### 输出信息到控制抬 ### log4j.appender.stdout = org.apache.lo ...
- JSP学习(三)JSP中的九个内置对象
JSP中的九个内置对象 NO. 内置对象 类型 1 pageContext javax.servlet.jsp.PageContext 2 request javax.servlet.http.Htt ...
- hadoop2.2使用手册2:如何运行自带wordcount
问题导读:1.hadoop2.x自带wordcount在什么位置?2.运行wordcount程序,需要做哪些准备? 此篇是在hadoop2完全分布式最新高可靠安装文档 hadoop2.X使用手册1:通 ...
- JavaScript年月日和时间戳互转
/** 一丶将日期单位转为时间戳 / 毫秒 **/ var str="2017年06月2日" var time = str.replace(/年/i,"-"). ...
- python 3.x 的装饰器笔记
今天学到了python的装饰器,感觉这个东西还是稍微有些复杂,所以记录下来,方便以后的查找.虽然标题是python 3.x的装饰器,但是我也没有怎么用过python 2.x,感觉上应该是和python ...
- 接口测试基础——第7篇 Python中_、__、__func__之间的区别
今天的东西很少,主要是给自己做个笔记,顺便帮大家普及一下Python中的边角知识: 1.if __name__ == "__main__"是什么意思 答:一个.py文件,如果是自身 ...
- wpf Tree
code using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sys ...