CentOS 7 yum方式快速安装MongoDB
一、安装环境及配置yum
# more /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
# vi /etc/yum.repos.d/mongodb-org-3.2.repo
[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc
1
2
3
4
5
6
7
8
9
10
二、安装MongoDB
# yum -y install mongodb-org
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 5.2 kB 00:00:00
extras | 3.4 kB 00:00:00
mongodb-org-3.2 | 2.5 kB 00:00:00
updates | 3.4 kB 00:00:00
mongodb-org-3.2/7/primary_db | 50 kB 00:00:03
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package mongodb-org.x86_64 0:3.2.10-1.el7 will be installed
--> Processing Dependency: mongodb-org-tools = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64
--> Processing Dependency: mongodb-org-shell = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64
--> Processing Dependency: mongodb-org-server = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64
--> Processing Dependency: mongodb-org-mongos = 3.2.10 for package: mongodb-org-3.2.10-1.el7.x86_64
--> Running transaction check
---> Package mongodb-org-mongos.x86_64 0:3.2.10-1.el7 will be installed
---> Package mongodb-org-server.x86_64 0:3.2.10-1.el7 will be installed
---> Package mongodb-org-shell.x86_64 0:3.2.10-1.el7 will be installed
---> Package mongodb-org-tools.x86_64 0:3.2.10-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================
Package Arch Version Repository Size
===================================================================================================
Installing:
mongodb-org x86_64 3.2.10-1.el7 mongodb-org-3.2 5.8 k
Installing for dependencies:
mongodb-org-mongos x86_64 3.2.10-1.el7 mongodb-org-3.2 5.6 M
mongodb-org-server x86_64 3.2.10-1.el7 mongodb-org-3.2 12 M
mongodb-org-shell x86_64 3.2.10-1.el7 mongodb-org-3.2 6.7 M
mongodb-org-tools x86_64 3.2.10-1.el7 mongodb-org-3.2 41 M
Transaction Summary
===================================================================================================
Install 1 Package (+4 Dependent packages)
Total download size: 65 M
Installed size: 201 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/mongodb-org-3.2/packages/mongodb-org-3.2.10-1.el7.x86_64.rpm:
Header V3 RSA/SHA1 Signature, key ID ea312927: NOKEY ]
Public key for mongodb-org-3.2.10-1.el7.x86_64.rpm is not installed
(1/5): mongodb-org-3.2.10-1.el7.x86_64.rpm | 5.8 kB 00:00:04
(2/5): mongodb-org-server-3.2.10-1.el7.x86_64.rpm | 12 MB 00:00:11
(3/5): mongodb-org-shell-3.2.10-1.el7.x86_64.rpm | 6.7 MB 00:00:06
(4/5): mongodb-org-tools-3.2.10-1.el7.x86_64.rpm | 41 MB 00:00:36
(5/5): mongodb-org-mongos-3.2.10-1.el7.x86_64.rpm | 5.6 MB 00:03:28
---------------------------------------------------------------------------------------------------
Total 322 kB/s | 65 MB 00:03:28
Retrieving key from https://www.mongodb.org/static/pgp/server-3.2.asc
Importing GPG key 0xEA312927:
Userid : "MongoDB 3.2 Release Signing Key <packaging@mongodb.com>"
Fingerprint: 42f3 e95a 2c4f 0827 9c49 60ad d68f a50f ea31 2927
From : https://www.mongodb.org/static/pgp/server-3.2.asc
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mongodb-org-tools-3.2.10-1.el7.x86_64 1/5
Installing : mongodb-org-mongos-3.2.10-1.el7.x86_64 2/5
Installing : mongodb-org-shell-3.2.10-1.el7.x86_64 3/5
Installing : mongodb-org-server-3.2.10-1.el7.x86_64 4/5
Installing : mongodb-org-3.2.10-1.el7.x86_64 5/5
Verifying : mongodb-org-server-3.2.10-1.el7.x86_64 1/5
Verifying : mongodb-org-3.2.10-1.el7.x86_64 2/5
Verifying : mongodb-org-shell-3.2.10-1.el7.x86_64 3/5
Verifying : mongodb-org-mongos-3.2.10-1.el7.x86_64 4/5
Verifying : mongodb-org-tools-3.2.10-1.el7.x86_64 5/5
Installed:
mongodb-org.x86_64 0:3.2.10-1.el7
Dependency Installed:
mongodb-org-mongos.x86_64 0:3.2.10-1.el7 #Author : Leshami
mongodb-org-server.x86_64 0:3.2.10-1.el7 #Blog : http://blog.csdn.net/leshami
mongodb-org-shell.x86_64 0:3.2.10-1.el7
mongodb-org-tools.x86_64 0:3.2.10-1.el7
Complete!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
三、验证安装结果
# rpm -qa |grep mongodb
mongodb-org-3.2.10-1.el7.x86_64
mongodb-org-mongos-3.2.10-1.el7.x86_64
mongodb-org-shell-3.2.10-1.el7.x86_64
mongodb-org-server-3.2.10-1.el7.x86_64
mongodb-org-tools-3.2.10-1.el7.x86_64
# rpm -ql mongodb-org-server
/etc/init.d/mongod
/etc/mongod.conf
/etc/sysconfig/mongod
/usr/bin/mongod
/usr/share/doc/mongodb-org-server-3.2.10
/usr/share/doc/mongodb-org-server-3.2.10/GNU-AGPL-3.0
/usr/share/doc/mongodb-org-server-3.2.10/MPL-2
/usr/share/doc/mongodb-org-server-3.2.10/README
/usr/share/doc/mongodb-org-server-3.2.10/THIRD-PARTY-NOTICES
/usr/share/man/man1/mongod.1
/var/lib/mongo
/var/log/mongodb
/var/log/mongodb/mongod.log
/var/run/mongodb
[root@localhost ~]# /etc/init.d/mongod start
Starting mongod (via systemctl): [ OK ]
[root@localhost ~]# netstat -nltp|grep mongo
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 89958/mongod
# mongo
MongoDB shell version: 3.2.10
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> db.version()
4.0.5
CentOS 7 yum方式快速安装MongoDB的更多相关文章
- Linux - CentOS 7 yum方式快速安装MongoDB
一.安装环境及配置yum # more /etc/redhat-release CentOS Linux release 7.2.1511 (Core) # vi /etc/yum.repos.d/m ...
- centos使用yum存储快速安装MySQL
RHEL/CentOS 7.x MySQL yum库 https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm RHEL ...
- 二进制方式快速安装MySQL数据库命令集合
二进制方式快速安装MySQL数据库命令集合 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1.安装mysql ls mysql ...
- 在Ubuntu上使用离线方式快速安装K8S v1.11.1
在Ubuntu上使用离线方式快速安装K8S v1.11.1 0.安装包文件下载 https://pan.baidu.com/s/1nmC94Uh-lIl0slLFeA1-qw v1.11.1 文件大小 ...
- CentOS RDO方式快速安装OpenStack
一.了解RDO RDO是什么? RDO是红帽Red Hat Enterprise Linux OpenStack Platform的社区版,类似RHEL和Fedora,RHEV和oVirt这样的关系. ...
- Centos中yum方式安装java
查看CentOS自带JDK是否已安装.◆输入:yum list installed |grep java. 若有自带安装的JDK,如何卸载CentOS系统自带Java环境?◆卸载JDK相关文件输入:y ...
- Centos用yum方式安装nodejs和npm
要通过 yum 来安装 nodejs 和 npm 需要先给 yum 添加 epel 源 ##添加 epel 源 rpm -ivh http://download.fedoraproject.org/p ...
- 用yum rpm 快速安装zabbix agent
用yum 快速安装zabbix agent. wget http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-agent-3.4.2-1.el7 ...
- 通过YUM库自动安装Mongodb
1.1查看操作系统版本 1.2验证当前yum库是否包含mongodb 1.3配置包含mongodb的yum源 1.4再次验证YUM库中的mongodb 1.5 yum库安装mongodb 为方便观察, ...
随机推荐
- Django_ORM_字段属性
Django_ORM_字段属性 常用字段 AutoField int自增列,必填参 primary_key=True 默认会自动创建一个列名为id的列 IntegerField 一个整数类型,范围在 ...
- XUGUO-书呆子-搜索书箱
WorldCat 上的 米塔斯 通过图书馆馆藏的全球目录WorldCat,在附近的图书馆中查找所要的资料. < 用 Sketch 创作 Airiti Library華藝線上圖書館 BookBub ...
- WinForm文件说明
以上位置,双击即可. 界面可以通过拖动控件,也可以通过背后的界面代码去布局. 如果删除了事件代码,界面可能报错,因为界面代码中有未删除的残余(波浪线提示处代码,直接删除即可). 对于多个窗体,Prog ...
- (二叉树 DFS 递归) leetcode 101. Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For e ...
- 深入学习css伪类和伪元素及其用法
前言 CSS的伪类和伪元素在平时的代码中经常会出现,可是一旦别人问你,什么是伪类,什么是伪元素,可能还是不能完整的表述出来,下面我们来一探究竟. 伪类和伪元素定义 伪类用于在页面中的元素处于某个状态时 ...
- [再寄小读者之数学篇](2014-04-01 from 2103471050@qq.com 曲线积分)
求 $\int_\vGa y^2\rd s$, 其中 $\vGa$ 由 $\dps{\sedd{\ba{rl} x^2+y^2+z^2&=a^2\\ x+z&=a \ea}}$ 决定. ...
- shell ip变量加法运算
#!/bin/bash for ip in `cat a.txt`;do a=`echo $ip|awk -F '.' '{print $1}'` b=`echo $ip|awk -F '.' '{p ...
- RequireJS - 个人小入门
quirejs : http://www.requirejs.cn/ 叶小钗 : http://www.cnblogs.com/yexiaochai/p/3214926.html app.js 展示 ...
- python学习第20天
python中的继承 单继承 多继承
- Linux -- Xshell ,Xftp远程连接中文乱码怎么解决?
### 这几天开始捣鼓lnmp的环境搭建,很多东西还是得自己去经历,才会印象深刻,有所体会,有所收获与成长! 但是,偶尔会遇到一些意想不到问题! Xshell ,Xftp 远程连接的时候出现中文乱码的 ...