导入共匙

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10

创建源列表

echo 'deb https://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/stable multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list

刷新包

sudo apt-get update

安装企业版

sudo apt-get install mongodb-enterprise

防止意外升级到最新版,可以运行如下命令

echo "mongodb-enterprise hold" | sudo dpkg --set-selections
echo "mongodb-enterprise-server hold" | sudo dpkg --set-selections
echo "mongodb-enterprise-shell hold" | sudo dpkg --set-selections
echo "mongodb-enterprise-mongos hold" | sudo dpkg --set-selections
echo "mongodb-enterprise-tools hold" | sudo dpkg --set-selections

启动运行

sudo /etc/init.d/mongod start

验证启动成功

验证是否启动成功可以到日志文件查看,具体位置在 /var/log/mongodb/mongod.log.

停止

sudo /etc/init.d/mongod stop

重启

sudo /etc/init.d/mongod restart

附:update失败 提示有一个旧项的解决办法
更新源至国内
我用的是阿里云的源
具体的操作是 vi /etc/apt/sources.list 在文件最前面添加以下条目(!!!操作前请做好相应备份!!!)
  deb http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ precise-backports main restricted universe multiverse

配置文件

#fork=true #以守护进程的方式运行MongoDB,创建服务器进程,linux有效
dbpath=D:\Ruby\mongo\db #指定数据库路径
logpath=D:\Ruby\mongo\logs\db.log #指定MongoDB日志文件,注意是指定文件不是目录
logappend=true #使用追加的方式写日志
journal=true #启用日志选项,MongoDB的数据操作将会写入到journal文件夹的文件里
pidfilepath=D:\Ruby\mongo\pids\db.pid #PID File 的完整路径,如果没有设置,则没有PID文件
bind_ip=127.0.0.1 # 绑定服务IP,若绑定127.0.0.,则只能本机访问,不指定默认本地所有IP
port= #指定服务端口号,默认端口27017
directoryperdb=true #设置每个数据库将被保存在一个单独的目录
oplogSize= #设置oplog的大小(MB)
auth=true #启用验证

具体如何配置 移步官网企业版介绍中查询

The package configures MongoDB using the /etc/mongod.conf file in conjunction with the control scripts.

ahjesus 安装mongodb企业版for ubuntu的更多相关文章

  1. Ubuntu上安装MongoDB(译)

    add by zhj:直接从第四步开始就可以了,而且安装好MongoDB后会自动启动的,不必自己去执行启动命令 原文:https://docs.mongodb.com/manual/tutorial/ ...

  2. Debian/Ubuntu手动编译安装MongoDB C++11驱动及驱动测试

    本文章仅限cnblogs网站内转载!请某网站自觉,遵纪守法,尊重原创! 系统环境情况: 最小化.无桌面环境 新安装的Debian 8 Server 版本操作系统虚拟机一台 手动编译安装MongoDB ...

  3. Ubuntu安装MongoDB和PHP扩展

    MongoDB是一个可伸缩的,高性能的开源NoSQL 文档数据库.主要用C++开发完成.面向文档存储,全索引支持,可复制和高可用性,自动分片等特征.其在非关系型数据库中是功能最丰富,最像关系型数据库 ...

  4. 在 Ubuntu 上安装 MongoDB

    在 Ubuntu 上安装 MongoDB 运行下列命令,导入 MongoDB 公开 GPG 键: sudo apt-key adv --keyserver hkp://keyserver.ubuntu ...

  5. Ubuntu 12.04上安装 MongoDB并运行

    Ubuntu 12.04上安装 MongoDB并运行 作者:凯鲁嘎吉 - 博客园 http://www.cnblogs.com/kailugaji/ 在Terminal输入 sudo apt-key ...

  6. Ubuntu 16.04 LTS 安装Mongodb 3.4

    第一步:安装 #setp 1. Import the public key used by the package management system. sudo apt-key adv --keys ...

  7. Ubuntu 18.04安装MongoDB 4.0

    首先,导入包管理的公钥. Ubuntu包管理工具(即dpkg和apt)要求发行商使用GPG密钥签署包,从而确保包的一致性和真实性. sudo apt-key adv --keyserver hkp:/ ...

  8. Ubuntu 18.04安装MongoDB 4.0(社区版)

    Ubuntu 18.04(虚拟机VirtualBox上),MongoDB 4.0, 听室友说,23点有世界杯决赛呢!可是,孤要写博文的啊!以记录这忙乱的下午和晚间成功安装了一个软件到Linux上.—— ...

  9. Ubuntu 16.04 (官方命令行)安装MongoDB 3.6.2(社区版)

    概述 使用本教程从 .deb 包在LTS Ubuntu Linux系统上安装MongoDB Community Edition. 虽然Ubuntu包含自己的MongoDB包,但官方的MongoDB社区 ...

随机推荐

  1. 读写文本(.txt)文件 .NET

    http://www.cnblogs.com/jx270/archive/2013/04/14/3020456.html (一) 读取文件 如果你要读取的文件内容不是很多,可以使用 File.Read ...

  2. android中的提示信息显示方法(toast应用)

    android中的提示信息显示方法(toast应用) (2011-10-17 11:02:06) 转载▼ 标签: android toast 杂谈 分类: Android android中toast的 ...

  3. UNIX环境高级编程笔记之线程

    本章涉及到线程的一些基本知识点,讨论了现有的创建线程和销毁线程的POSIX.1原语,此外,重点介绍了线程同步问题,讨论了三种基本的同步机制:互斥量.读写锁.条件变量.

  4. HMM MEMM & label bias

    (http://blog.csdn.net/xum2008/article/details/38147425) 隐马尔科夫模型(HMM): 图1. 隐马尔科夫模型 隐马尔科夫模型的缺点: 1.HMM只 ...

  5. 【迁移学习】2010-A Survey on Transfer Learning

    资源:http://www.cse.ust.hk/TL/ 简介: 一个例子: 关于照片的情感分析. 源:比如你之前已经搜集了大量N种类型物品的图片进行了大量的人工标记(label),耗费了巨大的人力物 ...

  6. Android应用安全之Android APP通用型拒绝服务漏洞

    0xr0ot和Xbalien交流所有可能导致应用拒绝服务的异常类型时,发现了一处通用的本地拒绝服务漏洞.该通用型本地拒绝服务可以造成大面积的app拒绝服务. 针对序列化对象而出现的拒绝服务主要是由于应 ...

  7. [Linux] zip 与 unzip 命令

    zip zip 命令基本格式为: zip options archive inpath inpath ... archive 是 .zip 文件(新的或已经存在的). inpath 是需要打包的目录或 ...

  8. codeforces Fedor and New Game

    #include<iostream> #include<stack> #include<cstring> #include<cstdio> #inclu ...

  9. c# 时间戳转换为Datetime类型的时间

    private static DateTime GetConvertTime(long ltime) { DateTime dt_time=new DateTime(1970,1,1,8,0,0,0) ...

  10. String详解, String和CharSequence区别, StringBuilder和StringBuffer的区别 (String系列之1)

    本章主要介绍String和CharSequence的区别,以及它们的API详细使用方法. 转载请注明出处:http://www.cnblogs.com/skywang12345/p/string01. ...