Red Hat Enterprise Linux Server release 5.6 安装 MongoDB 2.6.4
生活随笔
收集整理的這篇文章主要介紹了
Red Hat Enterprise Linux Server release 5.6 安装 MongoDB 2.6.4
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1:下載
[jifeng@jifeng04 ~]$ wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz --2014-09-03 12:39:31-- http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.4.tgz 正在解析主機(jī) downloads.mongodb.org... 54.231.10.212 Connecting to downloads.mongodb.org|54.231.10.212|:80... 已連接。 已發(fā)出 HTTP 請(qǐng)求,正在等待回應(yīng)... 200 OK 長(zhǎng)度:115652018 (110M) [application/x-gzip] Saving to: `mongodb-linux-x86_64-2.6.4.tgz'100%[==============================================================>] 115,652,018 155K/s in 22m 19s 2014-09-03 13:01:51 (84.3 KB/s) - `mongodb-linux-x86_64-2.6.4.tgz' saved [115652018/115652018][jifeng@jifeng04 ~]$ ls Desktop hadoop jdk1.7.0_45 mongodb-linux-x86_64-2.6.4.tgz2:解壓 [jifeng@jifeng04 ~]$ tar zxf mongodb-linux-x86_64-2.6.4.tgz [jifeng@jifeng04 ~]$ ls Desktop hadoop jdk1.7.0_45 mongodb-linux-x86_64-2.6.4 mongodb-linux-x86_64-2.6.4.tgz
3:配置環(huán)境變量 [jifeng@jifeng04 ~]$ cat .bash_profile # .bash_profile# Get the aliases and functions if [ -f ~/.bashrc ]; then. ~/.bashrc fi# User specific environment and startup programsPATH=$PATH:$HOME/bin export PATH export JAVA_HOME=$HOME/jdk1.7.0_45 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport HADOOP_HOME=$HOME/hadoop/hadoop-1.2.1 ? export ANT_HOME=$HOME/apache-ant-1.9.4 ? export MONGODB_HOME=$HOME/mongodb-linux-x86_64-2.6.4 ? export PATH=$PATH:$ANT_HOME/bin:$HADOOP_HOME/bin:$MONGODB_HOME/bin [jifeng@jifeng04 ~]$ source .bash_profile
4:驗(yàn)證 [jifeng@jifeng04 ~]$ mongod -version db version v2.6.4 2014-09-03T14:20:30.547+0800 git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
創(chuàng)建數(shù)據(jù)目錄
[jifeng@jifeng04 ~]$ cd mongodb-linux-x86_64-2.6.4 [jifeng@jifeng04 mongodb-linux-x86_64-2.6.4]$ ls bin GNU-AGPL-3.0 README THIRD-PARTY-NOTICES [jifeng@jifeng04 mongodb-linux-x86_64-2.6.4]$ mkdir data啟動(dòng):mongod -dbpath /home/jifeng/mongodb-linux-x86_64-2.6.4/data <span style="font-family: Arial, Helvetica, sans-serif;">[jifeng@jifeng04 mongodb-linux-x86_64-2.6.4]$ mongod -dbpath /home/jifeng/mongodb-linux-x86_64-2.6.4/data</span>啟動(dòng)后的提示
6:客戶端連接 [jifeng@jifeng04 ~]$ mongo MongoDB shell version: 2.6.4 connecting to: test Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, seehttp://docs.mongodb.org/ Questions? Try the support grouphttp://groups.google.com/group/mongodb-user > show databases;show databases; admin (empty) local 0.078GB
服務(wù)端的變化: 2014-09-03T14:24:05.853+0800 [initandlisten] connection accepted from 127.0.0.1:51719 #1 (1 connection now open) 2014-09-03T14:24:31.912+0800 [PeriodicTaskRunner] task: WriteBackManager::cleaner took: 34ms 2014-09-03T14:24:31.913+0800 [clientcursormon] mem (MB) res:36 virt:416 2014-09-03T14:24:31.913+0800 [clientcursormon] mapped (incl journal view):160 2014-09-03T14:24:31.913+0800 [clientcursormon] connections:1 2014-09-03T14:29:32.033+0800 [clientcursormon] mem (MB) res:36 virt:416 2014-09-03T14:29:32.034+0800 [clientcursormon] mapped (incl journal view):160 2014-09-03T14:29:32.034+0800 [clientcursormon] connections:1
總結(jié)
以上是生活随笔為你收集整理的Red Hat Enterprise Linux Server release 5.6 安装 MongoDB 2.6.4的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Redhat 停止sendmail的方法
- 下一篇: Mysql 主从数据库同步详解