$vi /etc/yum.repos.d/mongodb-org-3.0.repo

[mongodb-org-3.0]
name=MongoDB Repository
baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/
gpgcheck=0
enabled=1

$安装mongodb

yum install -y mongodb-org

配置文件在:/etc/mongod.conf  数据文件在:/var/lib/mongo  日志文件在:/var/log/mongodb

mongodb服务使用

#启动
service mongod start
#停止
service mongod stop
#重启
service mongod restart
#增加开机启动
chkconfig mongod on


[root@localhost ysy]# service mongod start
Starting mongod (via systemctl): Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
[失败]
[root@localhost ysy]#

[root@localhost ysy]# systemctl status mongod.service
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
Loaded: loaded (/etc/rc.d/init.d/mongod)
Active: failed (Result: exit-code) since 二 2015-12-08 14:15:39 CST; 39s ago
Process: 26948 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE)

12月 08 14:15:39 localhost.localdomain systemd[1]: Starting SYSV: Mongo is a scalable, document-orien......
12月 08 14:15:39 localhost.localdomain runuser[26954]: pam_unix(runuser:session): session opened for ...=0)
12月 08 14:15:39 localhost.localdomain mongod[26948]: Starting mongod: [失败]
12月 08 14:15:39 localhost.localdomain systemd[1]: mongod.service: control process exited, code=exite...s=1
12月 08 14:15:39 localhost.localdomain systemd[1]: Failed to start SYSV: Mongo is a scalable, documen...e..
12月 08 14:15:39 localhost.localdomain systemd[1]: Unit mongod.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ysy]#

centos7 install mongodb的更多相关文章

  1. CentOS7安装mongoDB数据库

    CentOS7安装mongoDB数据库 时间:2015-03-03 16:45来源:blog.csdn.net 作者:进击的木偶 举报 点击:8795次 mongoDB是目前发展比较好的NOSQL数据 ...

  2. Install MongoDB driver for PHP on XAMPP for Mac OSX

    试了不少方法,最后还是这个最有效. [转自:http://thatsimplecode.com/install-mongodb-driver-for-php-on-xampp-for-mac-osx] ...

  3. 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 ...

  4. Centos7 install Openstack - (第四节)添加计算服务(Nova)

    Centos7 install Openstack - (第四节)添加计算服务(Nova) 我的blog地址:http://www.cnblogs.com/caoguo 该文根据openstack官方 ...

  5. Centos7 install Openstack - (第三节)添加镜像服务(Glance)

    Centos7 install Openstack - (第三节)添加镜像服务(Glance) 我的blog地址:http://www.cnblogs.com/caoguo 该文根据openstack ...

  6. Install MongoDB on Windows

    Overview Use this tutorial to install MongoDB on a Windows systems. PLATFORM SUPPORT Starting in ver ...

  7. Install MongoDB on Windows (Windows下安装MongoDB)

    Install MongoDB on Windows Overview Use this tutorial to install MongoDB on a Windows systems. PLATF ...

  8. sudo brew install mongodb报错

    报错信息如下: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew ...

  9. Install MongoDB Community Edition on Ubuntu

    Install MongoDB > Install MongoDB Community Edition > Install MongoDB Community Edition on Lin ...

随机推荐

  1. solr5.3.1 集群服务搭建

    转http://978538.blog.51cto.com/968538/1710442 一. 安装部署 zookeeper集群部署: 节点: 10.1.12.51:2181      node1 1 ...

  2. centos下的mysql安装

    卸载mysql yum remove mysql mysql-server mysql-libs compat-mysql51 rm -rf /var/lib/mysql rm /etc/my.cnf ...

  3. Hibernate详解(5)——Hibernate核心接口和工作原理

    Hibernate核心接口 Hibernate有五大核心接口,分别是:Session Transaction Query SessionFactoryConfiguration .这五个接口构成了Hi ...

  4. 面向新手的Webserver搭建(一)——IIS的搭建

    非常多童鞋说自己是做移动开发的,想挂个简单的Web API,但是server又不会搭,这样一来測试就成了问题.看看网上的教程.发现略难懂,并且大多是一个转一个,没价值,所以干脆写几篇文章讲讲简单的We ...

  5. SVN server的搭建

    当做大的项目是,svn是代码管理的好工具,假设是用自己的server,那么须要搭建SVNserver. Subversion是一款很优秀的svnserver工具,笔者採用VisualSVN serve ...

  6. Delphi系统托盘组件 TTrayIcon 简介

    TTrayIcon 的主要属性: TrayIcon.Icon指定托盘图标, 有几种用法:1.设计时选择;2.把一个 TIcon 对象给它;3.使用当前程序图标: TrayIcon1.Icon := A ...

  7. [Angualr 2] Using FormBuilder

    There are two main functions we’ll use on FormBuilder: • control - creates a new Control• group - cr ...

  8. 自定义控件(视图)2期笔记09:自定义视图之继承自ViewGroup(仿ViewPager效果案例)

    1. 这里我们继承已有ViewGroup实现自定义控件,模拟出来ViewPager的效果,如下: (1)实现的效果图如下: (2)实现步骤: • 自定义view继承viewGroup • 重写onLa ...

  9. surfaceView和Camera配合进行摄像头的预览

    首先是Camera类,在5.0上已经被废弃,不推荐使用但还是支持的.最新的是Camera2类,我还没有研究,据说用法完全不一样,反正也是一个坑跳入另外一个坑. 上面是简介和需要的权限,记得加上权限. ...

  10. sharesdk 的使用

    社交分享组件有很多 介绍一下sharesdk 的使用 官网:http://sharesdk.cn/ 1.先上效果图 2.主要代码: public class TestShare extends Act ...