CentOS6.5下安装mongodb

MongoDB是目前最常用的NoSQL-非关系型数据库。

本文将介绍在CentOS下如何通过yum安装MongoDB。

1.首先在CentOS6.5下,编辑Mongo的yum源:

在/etc/yum.repo.d下,编辑mongo.repo

vim mongo.repo

[mongodb-enterprise]

name=MongoDB Enterprise Repository

baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/

gpgcheck=0

enabled=1

2.查找mongodb的相关软件:

yum search mongo

yum search mongo

Loaded plugins: fastestmirror, security

Loading mirror speeds from cached hostfile

============================================================================================== N/S Matched: mongo ===============================================================================================

python-mongoengine.noarch : A Python Document-Object Mapper for working with MongoDB

almas-mongolian-title-fonts.noarch : Mongolian Title font

nodejs-mongodb.noarch : A node driver for MongoDB

php-pecl-mongo.x86_64 : PHP MongoDB database driver

python-asyncmongo.noarch : An asynchronous Python MongoDB library

python-flask-mongoengine.noarch : Flask extension that provides integration with MongoEngine

python-pymongo.x86_64 : Python driver for MongoDB

hunspell-mn.noarch : Mongolian hunspell dictionaries

hyphen-mn.noarch : Mongolian hyphenation rules

libmongodb.x86_64 : MongoDB shared libraries

libmongodb-devel.i686 : MongoDB header files

libmongodb-devel.x86_64 : MongoDB header files

mongo-10gen.x86_64 : mongo client shell and tools

mongo-10gen-server.x86_64 : mongo server, sharding server, and support scripts

mongo-10gen-unstable.x86_64 : mongo client shell and tools

mongo-10gen-unstable-mongos.x86_64 : MongoDB sharding server

mongo-10gen-unstable-server.x86_64 : mongo server, sharding server, and support scripts

mongo-10gen-unstable-shell.x86_64 : MongoDB shell

mongo-10gen-unstable-tools.x86_64 : MongoDB utilities

mongo18-10gen.x86_64 : mongo client shell and tools

mongo18-10gen-server.x86_64 : mongo server, sharding server, and support scripts

mongo20-10gen.x86_64 : mongo client shell and tools

mongo20-10gen-server.x86_64 : mongo server, sharding server, and support scripts

mongodb-org.x86_64 : MongoDB cross-platform document-oriented database system (metapackage)

mongodb-org-mongos.x86_64 : MongoDB sharding router

mongodb-org-server.x86_64 : MongoDB database server

mongodb-org-shell.x86_64 : MongoDB shell client

mongodb-org-tools.x86_64 : MongoDB tools

mongodb-org-unstable.x86_64 : MongoDB server, shell, sharding server and tools

mongodb-org-unstable-mongos.x86_64 : MongoDB sharding server

mongodb-org-unstable-server.x86_64 : MongoDB server and support scripts

mongodb-org-unstable-shell.x86_64 : MongoDB shell

mongodb-org-unstable-tools.x86_64 : MongoDB utilities

mongodb-server.x86_64 : MongoDB server, sharding server and support scripts

mongoose-devel.i686 : Header files and development libraries for mongoose

mongoose-devel.x86_64 : Header files and development libraries for mongoose

mongoose-lib.i686 : Shared Object for applications that use mongoose embedded

mongoose-lib.x86_64 : Shared Object for applications that use mongoose embedded

php-horde-Horde-Mongo.noarch : Horde Mongo Configuration

pymongo.x86_64 : Python driver for MongoDB

pymongo-gridfs.x86_64 : Python GridFS driver for MongoDB

python-pymongo-gridfs.x86_64 : Python GridFS driver for MongoDB

autocorr-mn.noarch : Mongolian auto-correction rules

eclipse-nls-mn.x86_64 : Eclipse/Babel language pack for Mongolian

mongodb.x86_64 : High-performance, schema-free document-oriented database

mongodb-mms-backup-agent.x86_64 : The MMS Backup Agent

mongodb-mms-monitoring-agent.x86_64 : The MMS Monitoring Agent

mongoose.x86_64 : An easy-to-use self-sufficient web server

?

Name and summary matches only, use "search all" for everything.

Mongodb-org开头的,就是刚刚添加的源所找到的相关软件。

3.安装mongodb

通过yum install mongodb:

yum install -y mongodb-org -y

Loaded plugins: fastestmirror, security

Loading mirror speeds from cached hostfile

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package mongodb-org.x86_64 0:2.6.12-1 will be installed

--> Processing Dependency: mongodb-org-shell = 2.6.12 for package: mongodb-org-2.6.12-1.x86_64

--> Processing Dependency: mongodb-org-server = 2.6.12 for package: mongodb-org-2.6.12-1.x86_64

--> Processing Dependency: mongodb-org-tools = 2.6.12 for package: mongodb-org-2.6.12-1.x86_64

--> Processing Dependency: mongodb-org-mongos = 2.6.12 for package: mongodb-org-2.6.12-1.x86_64

--> Running transaction check

---> Package mongodb-org-mongos.x86_64 0:2.6.12-1 will be installed

---> Package mongodb-org-server.x86_64 0:2.6.12-1 will be installed

---> Package mongodb-org-shell.x86_64 0:2.6.12-1 will be installed

---> Package mongodb-org-tools.x86_64 0:2.6.12-1 will be installed

--> Finished Dependency Resolution

?

Dependencies Resolved

?

=================================================================================================================================================================================================================

Package Arch Version Repository Size

=================================================================================================================================================================================================================

Installing:

mongodb-org x86_64 2.6.12-1 mongodb-enterprise 4.6 k

Installing for dependencies:

mongodb-org-mongos x86_64 2.6.12-1 mongodb-enterprise 6.9 M

mongodb-org-server x86_64 2.6.12-1 mongodb-enterprise 9.1 M

mongodb-org-shell x86_64 2.6.12-1 mongodb-enterprise 4.3 M

mongodb-org-tools x86_64 2.6.12-1 mongodb-enterprise 90 M

?

Transaction Summary

=================================================================================================================================================================================================================

Install 5 Package(s)

?

Total download size: 110 M

Installed size: 279 M

Downloading Packages:

(1/5): mongodb-org-2.6.12-1.x86_64.rpm | 4.6 kB 00:00

(2/5): mongodb-org-mongos-2.6.12-1.x86_64.rpm | 6.9 MB 00:39

(3/5): mongodb-org-server-2.6.12-1.x86_64.rpm | 9.1 MB 01:17

(4/5): mongodb-org-shell-2.6.12-1.x86_64.rpm | 4.3 MB 00:40

(5/5): mongodb-org-tools-2.6.12-1.x86_64.rpm | 90 MB 08:09

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total 170 kB/s | 110 MB 11:03

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : mongodb-org-server-2.6.12-1.x86_64 1/5

Installing : mongodb-org-mongos-2.6.12-1.x86_64 2/5

Installing : mongodb-org-tools-2.6.12-1.x86_64 3/5

Installing : mongodb-org-shell-2.6.12-1.x86_64 4/5

Installing : mongodb-org-2.6.12-1.x86_64 5/5

Verifying : mongodb-org-shell-2.6.12-1.x86_64 1/5

Verifying : mongodb-org-tools-2.6.12-1.x86_64 2/5

Verifying : mongodb-org-mongos-2.6.12-1.x86_64 3/5

Verifying : mongodb-org-server-2.6.12-1.x86_64 4/5

Verifying : mongodb-org-2.6.12-1.x86_64 5/5

?

Installed:

mongodb-org.x86_64 0:2.6.12-1

?

Dependency Installed:

mongodb-org-mongos.x86_64 0:2.6.12-1 mongodb-org-server.x86_64 0:2.6.12-1 mongodb-org-shell.x86_64 0:2.6.12-1 mongodb-org-tools.x86_64 0:2.6.12-1

?

Complete!

时间: 2024-12-28 17:10:59

CentOS6.5下安装mongodb的相关文章

MongoDB学习(一)Centos6.5下安装mongoDB

下载工作: wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.4.5.tgz 将下载的文件解压拷贝到指定目录 tar xf mongodb-linux-x86_64-rhel62-3.4.5.tgz -C /usr/mv mongodb-linux-x86_64-rhel62-3.4.5 mongo 创建数据存放目录,日志文件存放目录,主配置文件存放目录 mkdir /data/db mkdir /usr/mo

mac下安装mongoDB

方式一:命令行 MongoDB的安装有好多种安装方法,有普通青年的HomeBrew方式,也有文艺青年的源码编译方式.我只想快速的装起来用一下,所以我选最简单的HomeBrew. 请参考官方文档 : http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ 更新Homebrew的package数据库,在Mac的终端中输入: $ brew update 然后耐心等待,这个没有任何显示,估计要几分钟,取决于网络的速度.然后就列出了

CentOS6.5下安装apache2.2和PHP 5.5.28

CentOS6.5下安装apache2.2 1. 准备程序 :httpd-2.2.27.tar.gz 下载地址:http://httpd.apache.org/download.cgi#apache22apr-1.5.1.tar.gz 下载地址:http://apache.spd.co.il/apr/apr-util-1.5.3.tar.gz下载地址:http://apache.spd.co.il/apr/ 安装apr-1.5.1.tar.gz 1.Copy root文件夹2. Cd /root

Mac下安装 MongoDB

Mac 下安装 MongoDB 一般有两种方法,一种是通过源码安装,一种是直接使用 homebrew ,个人推荐使用 homebrew ,简单粗暴. 1.安装 homebrew : /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2.使用 homebrew 安装 MongoDB : brew install mongodb 喝杯茶的功夫就

centos6.5下安装python3安装、python3虚拟环境创建venv

原因:在安装完centos6.5后,通过命令行键入python时,默认为python2.6.6版本,系统并没有安装python3版本.又想学习python3,因此需要在centos6.5下安装python3版本. <python3安装> 1.下载python3的安装包: (1)如果能够联网,则直接: [[email protected] 3pyex]# wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz 其中,我这里安装的

CentOS6.5下安装配置MySQL

CentOS6.5下安装配置MySQL,配置方法如下: 安装mysql数据库:# yum install -y mysql-server mysql mysql-deve 查看mysql-server版本:# rpm -qi mysql-server 初始化mysql数据库:#service mysqld start 重启mysql数据库:#service mysql restart 设置mysql开机启动:# chkconfig mysqld on 为数据库设置用户名和密码:# mysqlad

CentOS6.5下安装Open vSwitch

准备 # yum install openssl-devel redhat-rpm-config kernel-devel -y #yum install kvm libvirt python-virtinst qemu-kvm virt-viewer 编译 # wget http://openvswitch.org/releases/openvswitch-1.9.3.tar.gz #tar -zxf openvswitch-1.9.3.tar.gz # cd openvswitch-1.9.

centos6.6下安装MySQLdb时出现“error: command &#39;gcc&#39; failed with exit status 1”

1. 问题描述 在MySQL-python-1.2.3源码包根目录下执行安装命令: # python setup.py install 出现以下信息: error: command 'gcc' failed with exit status 1 2. 解决方法 在安装MySQLdb前安装以下依赖库: # yum install python-devel mysql-devel zlib-devel openssl-devel 安装完以上依赖库后, 再在MySQL-python-1.2.3源码包根

CentOS6.5下安装wine

系统信息: Centos 6.5 i386 GUN/Linux 1. 首先安装一个epel rpm -ivh http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm 2. 安装wine yum install wine 完毕! CentOS6.5下安装wine,布布扣,bubuko.com