国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > MongoDB > 正文

CentOS系統下MongoDB安裝及配置教程

2020-10-29 18:52:19
字體:
來源:轉載
供稿:網友

一、準備工作:
運行yum命令查看MongoDB的包信息

復制代碼 代碼如下:

[root@vm ~]# yum info mongo-10gen

(提示沒有相關匹配的信息,)

說明你的centos系統中的yum源不包含MongoDB的相關資源,所以要在使用yum命令安裝MongoDB前需要增加yum源,也就是在 /etc/yum.repos.d/目錄中增加 *.repo yum源配置文件,以下分別是針對centos 64位和32位不同的系統的MongoDB yum 源配置內容:

我們這里就將該文件命名為:/etc/yum.repos.d/10gen.repo

For 64-bit yum源配置:

復制代碼 代碼如下:

vi /etc/yum.repos.d/10gen.repo

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0


For 32-bit yum源配置:
復制代碼 代碼如下:

vi /etc/yum.repos.d/10gen.repo

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0


根據自己的系統選擇相應的配置內容

查看系統是32位還是64位的方法:

復制代碼 代碼如下:

$ uname -a

含有x86_64的那說明是64位的,例如我的centos6.0 64bit系統執行這個命令后顯示:
復制代碼 代碼如下:

Linux vm.centos6 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 x86_64 x86_64 GNU/Linux

做好yum源的配置后,如果配置正確執行下面的命令便可以查詢MongoDB相關的信息:

查看mongoDB的服務器包的信息

復制代碼 代碼如下:

[root@vm ~]# yum info mongo-10gen-server
****(省略多行不重要的信息)*********
Available Packages
Name : mongo-10gen-server
Arch : x86_64
Version : 1.8.2
Release : mongodb_1
Size : 4.7 M
Repo : 10gen
Summary : mongo server, sharding server, and support scripts
URL : http://www.mongodb.org
License : AGPL 3.0
Description: Mongo (from “huMONGOus”) is a schema-free document-oriented
: database.
:
: This package provides the mongo server software, mongo sharding
: server softwware, default configuration files, and init.d scripts.

[root@vm ~]#


查看客戶端工具的信息
復制代碼 代碼如下:

[root@vm ~]# yum info mongo-10gen
Loaded plugins: fastestmirror
**(省略多行不重要的信息)**
Installed Packages
Name : mongo-10gen
Arch : x86_64
Version : 1.8.2
Release : mongodb_1
Size : 55 M
Repo : 10gen
Summary : mongo client shell and tools
URL : http://www.mongodb.org
License : AGPL 3.0
Description: Mongo (from “huMONGOus”) is a schema-free document-oriented
: database. It features dynamic profileable queries, full indexing,
: replication and fail-over support, efficient storage of large
: binary data objects, and auto-sharding.
:
: This package provides the mongo shell, import/export tools, and
: other client utilities.

[root@vm ~]#

二、安裝MongoDB的服務器端和客戶端工具

1.安裝服務器端:

復制代碼 代碼如下:

[root@vm ~]# yum install mongo-10gen-server
[root@vm ~]# ls /usr/bin/mongo(tab鍵)
mongo mongod mongodump mongoexport mongofiles mongoimport mongorestore mongos mongostat

―――――――――――――――

主站蜘蛛池模板: 宁南县| 南召县| 萍乡市| 罗山县| 平顺县| 巨野县| 延津县| 弋阳县| 海丰县| 灌南县| 手机| 东乡族自治县| 正蓝旗| 绥德县| 砀山县| 哈巴河县| 库尔勒市| 旺苍县| 松桃| 辽宁省| 巴中市| 白沙| 中卫市| 吐鲁番市| 邯郸市| 通州市| 泰宁县| 舒兰市| 静乐县| 同德县| 策勒县| 宁远县| 萝北县| 清河县| 虞城县| 田阳县| 托克逊县| 遵义市| 巍山| 文山县| 道孚县|