[Mongo] How to Install Mongo on Debian(不要安装)
Install MongoDB on Debian¶
This tutorial outlines the steps to install MongoDB on Debian systems. The tutorial uses .deb packages to install. While some Debian distributions include their own MongoDB packages, the official MongoDB packages are generally more up to date.
NOTE
This tutorial applies to both Debian systems and versions of Ubuntu Linux prior to 9.10 “Karmic” which do not use Upstart. Other Ubuntu users will want to follow the Install MongoDB on Ubuntu tutorial.
Package Options
The downloads repository provides the mongodb-10gen package, which contains the latest stablerelease. Additionally you can install previous releases of MongoDB.
You cannot install this package concurrently with the mongodb, mongodb-server, or mongodb-clients packages that your release of Debian may include.
Install MongoDB
Configure Package Management System (APT)
The Debian package management tools (i.e. dpkg and apt) ensure package consistency and authenticity by requiring that distributors sign packages with GPG keys.
Import MongoDB PGP key.
Issue the following command to add the MongoDB public GPG Key to the system key ring.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Create a sources.list file for MongoDB.
Create a /etc/apt/sources.list.d/mongodb.list file
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
Reload local package database.
Issue the following command to reload the local package database:
sudo apt-get update
Install Packages
Issue the following command to install the latest stable version of MongoDB:
sudo apt-get install mongodb-10gen
When this command completes, you have successfully installed MongoDB!
Manage Installed Versions
You can use the mongodb-10gen package to install previous versions of MongoDB. To install a specific release, append the version number to the package name, as in the following example:
apt-get install mongodb-10gen=2.2.3
This will install the 2.2.3 release of MongoDB. You can specify any available version of MongoDB; however apt-get will upgrade the mongodb-10gen package when a newer version becomes available. Use the following pinning procedure to prevent unintended upgrades.
To pin a package, issue the following command at the system prompt to pin the version of MongoDB at the currently installed version:
echo "mongodb-10gen hold" | sudo dpkg --set-selections
Control Scripts
The packages include various control scripts, including the init script /etc/rc.d/init.d/mongodb. These packages configure MongoDB using the /etc/mongodb.conf file in conjunction with the control scripts.
As of version 2.4.9, there are no control scripts for mongos. mongos is only used in sharding deployments. You can use the mongod init script to derive your own mongos control script.
Run MongoDB
The MongoDB instance stores its data files in the /var/lib/mongo and its log files in/var/log/mongo, and run using the mongod user account. If you change the user that runs the MongoDB process, you must modify the access control rights to the /var/lib/mongo and /var/log/mongodirectories.
[Mongo] How to Install Mongo on Debian(不要安装)的更多相关文章
- 学习mongo系列(一) win/mac安装 解析 连接
一.安装mongo数据库 下载链接https://www.mongodb.org/downloads, 在执行如下命令的时候事先按照目录新建如下的目录:(如果数据库安装在D盘就在D盘的根目录下建)&q ...
- MongoDB - The mongo Shell, Configure the mongo Shell
Customize the Prompt You may modify the content of the prompt by setting the variable prompt in the ...
- 【转载】Debian 6安装小记
转载自:http://unix-cd.com/vc/www/22/2011-06/18022.html 今天终于装上了 debian6,代号叫squeeze是吧?前几天的时候在Microhu’s Bl ...
- pycharm 4.5在debian下安装
1.去官网下载linux下的Tar包,下载后解压. 2.直接进入解压后的folder里面找bin下面的pycharm.sh,执行后发现没有任何反应. 3.查询资料发现是因为pycharm需要sun j ...
- Debian 入门安装与配置2
Debian 入门安装与配置2 1. C/C++开发必装软件 atp-get install gcc 这个不用说,用来编译C程序 apt-get install g++ 用来编译C++程序 ap ...
- Debian 入门安装与配置1
Debian 入门安装与配置1 最近安装了多个发行版本的Linux,包括Ubuntu.Fedora.Centos和Debian,发现只有Debian在界面和稳定性等综合特性上表现最优,自己也最喜欢,所 ...
- 在Debian中安装VMware Workstatption 12
在Debian中安装VMware Workstatption 12-----------------------------------------------> 下载文件: *vmwar ...
- Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto
Mosquitto安装_Ubuntu/Debian上安装消息队列Mosquitto MQTT是IBM开发的一个即时通讯协议.MQTT是面向M2M和物联网的连接协议,采用轻量级发布和订阅消息传输机制.M ...
- debian上安装lua编辑器
Debian服务器上安装lua 1)下载压缩包 wget http://www.lua.org/ftp/lua-5.1.4.tar.gz 2)解压文件 tar zxvf lua-5.1.4.tar. ...
随机推荐
- 纯Python包发布setup脚本编写示例
如果你有多个模块需要发布,而它们又存在于多个包中,那么指定整个包比指定模块可能要容易地多.即使你的模块并不在一个包内,这种做法也行的通:你可以告诉Distutils从根包(root package)处 ...
- Rails进阶参考
https://gist.github.com/xdite/4044f3a037de029bc35c From idea to products: - Ideation, wireframes, mo ...
- Selenium2学习-037-WebUI自动化实战实例-IE浏览器显示比例问题:org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 94%. It should be set to 100%
好久没有写博文了,今天在给部门新人演示 Selenium WebDriver 启动其支持的各种浏览器时,启动 IE 时总是无法打开对应的百度网址,页面如下所示:
- Java学习-040-级联删除目录中的文件、目录
之前在写应用模块,进行单元测试编码的时候,居然脑洞大开居然创建了一个 N 层的目录,到后来删除测试结果目录的时候,才发现删除不了了,提示目录过长无法删除.网上找了一些方法,也找了一些粉碎机,都没能达到 ...
- 使用 Redis 实现分布式系统轻量级协调技术
http://www.ibm.com/developerworks/cn/opensource/os-cn-redis-coordinate/index.html 在分布式系统中,各个进程(本文使用进 ...
- JavaScript:JavaScript语法的详细介绍
JavaScript语法:只要Java会了,基本上javascript语法就会了. ——变量的定义 ——程序的结构控制 ——数组操作 ——函数的定义即使用 基本的test.html代码如下,它会导入下 ...
- Linux脚本执行过程重定向
Linux脚本执行过程重定向 一.bash调试脚本,并将执行过程重定向到指定文件 bash –x shell.sh 2>&1 | tee shell.log
- MongoDB概念解析
数据库 MongoDB默认把_id设置为主键(_开头的键是保留的) 数据库名必须为小写 RDBMS与MongoDB对应的术语比较 需注意 文档中的键/值对是有序的. 文档中的值不仅可以是在双引号里面的 ...
- 修改最大打开文件数和最大proc数量
1.vim /etc/profile 增加 ulimit -n 10240 ulimit -u 10240 2.修改/etc/security/limits.conf * soft ...
- Tomcat学习 HttpConnector和HttpProcessor启动流程和线程交互
一.tomat启动流程 1.启动HttpConnector connector等待连接请求,只负责接受socket请求,具体处理过程交给HttpProcessor处理. tomcat用户只能访问到co ...