温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

【MongoDB学习笔记1】基于CentOS 6.5安装MongoDB

发布时间:2020-06-14 23:23:09 来源:网络 阅读:1114 作者:StanlyCheng 栏目:MongoDB数据库

1.添加MongoDB安装源

vim /etc/yum.repos.d/mongodb-enterprise.repo

将下列配置项写入文件

[mongodb-enterprise]
name=MongoDB Enterprise Repository
baseurl=https://repo.mongodb.com/yum/redhat/$releasever/mongodb-enterprise/stable/$basearch/
gpgcheck=0
enabled=1
 
2.用yum安装MongoDB
yum install mongodb-enterprise

 

3.设置MongoDB进程开机启动

chkconfig mongod on #不建议使用这种方式

或者

echo "mongod -f /etc/mongod.conf --rest" >>/etc/rc.local #建议使用这种开机启动方式


详细信息介绍:

1.安装mongodb-enterprise,会安装以下几个包

mongodb-enterprise-server,包括Mongod进程,配置文件和初始化脚本;

mongodb-enterprise-mongos,包括mongos进程;

mongodb-enterprise-shell,包括mongo shell进程;

mongodb-enterprise-tools,包括mongoimport bsondump, mongodump,mongoexport, mongofiles, mongoimport, mongooplog, mongoperf, mongorestore, mongostat, 和mongotop工具;

2.yun MongoDB后配置文件为/etc/mongodb,初始化脚本为/etc/rc.d/init.d/mongod;

 

3.安装其他版本的MongoDB,例如安装2.6.1版本

yum install mongodb-enterprise-2.6.1
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI