linux yum安装mangodb,mongoDB yum安装

Install the MongoDB packages and associated tools.

When you install the packages, you choose whether to install the

current release or a previous one. This step provides the commands

for both.

To install the latest stable

version of MongoDB, issue the following command:

sudo yum install -y mongodb-org

To install a specific

release of MongoDB, specify each component package

individually and append the version number to the package name, as

in the following example that installs the 2.6.1`

release of MongoDB:

sudo yum install -y mongodb-org-2.6.1 mongodb-org-server-2.6.1 mongodb-org-shell-2.6.1 mongodb-org-mongos-2.6.1 mongodb-org-tools-2.6.1

You can specify any available version of MongoDB. However

yum will upgrade the packages when a newer

version becomes available. To prevent unintended upgrades, pin the

package. To pin a package, add the following

exclude directive to your

/etc/yum.conf file:

exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools

Previous versions of MongoDB packages use different naming

conventions.

通过标准的yum源安装完成后,会生成如下几个目录:

/var/lib/mongo #数据库目录

/var/log/mongdb #日志目录

/etc/mongodb.conf #主配置文件提示:对于大批量安装,可以将安装包缓存到本地,在内网上搭一个mongodb yum源。

yum --downloadonly --downloaddir=/mongodb mongodb-org#静默下载指定的软件包到指定的目录

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值