[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. ...
随机推荐
- 经常在eclipse中导入web项目时,出现转不了项目类型的问题,导入后就是一个java项目。
1.在eclipse的项目上点右键,刷新项目.2.在项目上点右键,进入属性(properties)3.在左侧列表项目中点击选择“Project Facets”,在右侧选择“Dynamic Web Mo ...
- 简易自定义下拉菜单 与简易默认下拉html片段
简易自定义下拉选择 html片段 html: <div class="select_box province"> <div class="selecte ...
- c#上传文件(一)使用 .net 控件上传文件
1.html代码: <body> <form id="form1" runat="server"> <div> <as ...
- 【转】ViewPager实现一个页面多个Item的显示
转自:http://billyyuan.iteye.com/blog/1941538 ViewPager实现一个页面多个Item的显示 博客分类: android 代码在: https://cod ...
- FTP文件夹打开错误,Windows无法访问此文件夹
错误提示: Windows 无法访问此文件夹,请确保输入的文件夹是正确的,并且你有权访问此文件夹. 解决方法/步骤如下 1.请确保输入的文件夹是正确的,并且你有权访问此文件夹.可以在浏览器 ...
- 移动端公共css样式
@media screen and ( min-width: 319px){html{ font-size: 100px;}}@media screen and ( min-width: 359px) ...
- CentOS 6.8内核版本升级(升级至3.10)(转)
1.查看当前版本 [root@www.linuxidc.com docker]# cat /etc/issue CentOS release 6.8 (Final) Kernel \r on an \ ...
- [BS-09] UITabBarController简单介绍
iOS开发UI篇—UITabBarController简单介绍 一.简单介绍 UITabBarController和UINavigationController类似,UITabBarControlle ...
- 为何C语言(的函数调用)需要堆栈,而汇编语言不需要
转自:Uboot中start.S源码中指令级的详尽解析 green-waste为何 C 语言(的函数调用)需要堆栈,而汇编语言却需要堆栈之前看了很多关亍uboot的分析,其中就有说要为C语言的运行,准 ...
- 第六篇 SQL Server安全执行上下文和代码签名
本篇文章是SQL Server安全系列的第六篇,详细内容请参考原文. SQL Server决定主体是否有必要的执行代码权限的根本途径是其执行上下文规则.这一切都可能复杂一个主体有执行代码的权限,但是却 ...