[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. ...
随机推荐
- Arcgis for JS之Cluster聚类分析的实现(基于区域范围的)
原文:Arcgis for JS之Cluster聚类分析的实现(基于区域范围的) 咱们书接上文,在上文,实现了基于距离的空间聚类的算法实现,在本文,将继续介绍空间聚类之基于区域范围的实现方式,好了,闲 ...
- 获得输入框的文本document.getElementById('id').value;
<input id="demo" type="text" value="" > x=document.getElementByI ...
- Set Java Proxy for Http/Https
Command Line JVM Settings The proxy settings are given to the JVM via command line arguments: java ...
- 腾讯企鹅智酷100多张PPT:移动时代创业黄金法则
移动时代创业黄金法则 http://tech.qq.com/a/20141223/008325.htm#p=8
- procps包里面的sysctl命令
procps包里面的sysctl命令 --http://www.cnblogs.com/createyuan/p/3740917.html?utm_source=tuicool&utm_med ...
- 视差效果原理 background-attachment:fixed
<html> <head> <style type="text/css"> body { background-image:url('http: ...
- linux时钟系统概述
1. 了解下linux系统中一些时间概念,在kernel/time/timekeeping.c中定义了多个时间.RTC时间:在PC中,RTC时间又叫CMOS时间,通常由一个专门的计时硬件来实现,软件可 ...
- C语言深度剖析学习错误点记录
0. static修饰变量和函数 static修饰变量,1)限定作用域,本文件内.全局变量(自定义起,本文件前面要用需extern声明),局部变量函数内:2)生命周期,程序运行期间一直保存. stat ...
- Java学习——基本数据类型
Java两大数据类型 内置数据类型 引用数据类型 变量就是申请内存存储值,内存管理系统根据变量的类型分配相应的存储空间存储该类型的数据. 内置数据类型 8中基本类型(四个整数型,两个浮点型),一种字符 ...
- APN 推送
推送的各种状态 http://samwize.com/2015/08/07/how-to-handle-remote-notification-with-background-mode-enabled ...