ahjesus 安装mongodb企业版for ubuntu
2014-04-30 00:01
621 查看
导入共匙
创建源列表
刷新包
安装企业版
防止意外升级到最新版,可以运行如下命令
启动运行
验证启动成功
停止
重启
配置文件
具体如何配置 移步官网企业版介绍中查询
The package configures MongoDB using the /etc/mongod.conf file in conjunction with the control scripts.
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.1,则只能本机访问,不指定默认本地所有IP port=1986 #指定服务端口号,默认端口27017 directoryperdb=true #设置每个数据库将被保存在一个单独的目录 oplogSize=100 #设置oplog的大小(MB) auth=true #启用验证
具体如何配置 移步官网企业版介绍中查询
The package configures MongoDB using the /etc/mongod.conf file in conjunction with the control scripts.
相关文章推荐
- ahjesus安装mongodb企业版for ubuntu的步骤
- Windowns、Ubuntu17.10 下安装 MongoDB - [图文并茂]
- [mongoDB]Ubuntu系统安装与配置mongoDB3.4
- Ubuntu下安装部署MongoDB以及设置允许远程连接
- Ubuntu16.04环境安装mongodb
- Ubuntu安装arm版本的Qt遇到error: thread-local storage not supported for this target
- Ubuntu16.04的MongoDB安装
- Mongodb for mac 的安装与配置
- ubuntu安装软件或者更新时提示:waiting for jockey-backend exit 解决办法
- Feodra 20 安装 搜狗输入法 for linux ubuntukylin
- Ubuntu Navicat for MySQL安装以及破解方案
- 安装WPS for Linux Alpha 6后Ubuntu字体渲染出现问题的解决方案
- Ubuntu14.04安装Mongodb
- 在Ubuntu 10.10下安装配置Eclipse for PHP Developer
- Ubuntu上安装MongoDB(转)
- mongodb ubuntu下安装以及开启远程访问
- Ubuntu17.04安装和卸载mongodb
- ubuntu14.04 安装mongodb笔记
- 使用postgresql + php安装与配置 for ubuntu
- Ubuntu下安装使用MongoDB