install the mongodb on linux system
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了install the mongodb on linux system相关的知识,希望对你有一定的参考价值。
Configure the package management system (yum
).
Create a /etc/yum.repos.d/mongodb-org-3.2.repo
file so that you can install MongoDB directly, using yum
.
Changed in version 3.0: MongoDB Linux packages are in a new repository beginning with 3.0.
For the latest stable release of MongoDB
Use the following repository file:
[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
For versions of MongoDB earlier than 3.0
To install the packages from an earlier release series, such as 2.4 or 2.6, you can specify the release series in the repository configuration. For example, to restrict your system to the 2.6 release series, create a /etc/yum.repos.d/mongodb-org-2.6.repo
file to hold the following configuration information for the MongoDB 2.6 repository:
[mongodb-org-2.6]
name=MongoDB 2.6 Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
You can find .repo
files for each release in the repository itself. Remember that odd-numbered minor release versions (e.g. 2.5) are development versions and are unsuitable for production use.
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:
sudo yum install -y mongodb-org-3.2.17 mongodb-org-server-3.2.17 mongodb-org-shell-3.2.17 mongodb-org-mongos-3.2.17 mongodb-org-tools-3.2.17
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
以上是关于install the mongodb on linux system的主要内容,如果未能解决你的问题,请参考以下文章
openfire 安装配置时出现The Openfire database schema does not appear to be installed. Follow the installati错
CentOS7 安装 Mongodb 与 NodeJs 主要心得
[oracle] 解决X64操作系统PL/SQL连接报错问题 make sure you have the 32 bits oracle client installed