Welcome 微信登录

首页 / 操作系统 / Linux / CentOS 5下安装MongoDB 1.7.5

一,使用官方编译好的BIN来执行$ cd /usr/local/src
$ wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.7.5.tgz  # mkdir -p /data/db/
# chown hoge /data/db/
# ln -s /usr/local/src/mongodb-linux-x86_64-1.7.5/ /opt/mongobin  // 起动
# /opt/mongobin/bin/mongod &  // 测试
$ /opt/mongobin/bin/mongo> db.foo.save( { a : 1 } )
> db.foo.find() 
二,使用源代码编译
$ wget http://downloads.mongodb.org/src/mongodb-src-r1.7.5.tar.gz 
$ tar zxvf xxx.tar.gz
$ cd xxx
$ scons all # scons --prefix=/opt/mongosrc install需要安装的依赖库boost_1_42_0
js-1.7.0
pcre-7.4
scons-2.1.0
scons
Use scons to build MongoDB and related utilities and libraries.  See the SConstruct file for details.
Run scons --help to see all options.Targets
Run scons <target>.
scons .
scons all
scons mongod build mongod
scons mongo build the shell
scons shell generate (just) the shell .cpp files (from .js files)
scons mongoclient build just the client library (builds libmongoclient.a on unix)
scons test build the unit test binary testOptions
--d debug build
--dd debug build with _DEBUG defined (extra asserts etc.)
--release
--32 force 32 bit
--64 force 64 bit
--cleanTroubleshooting
scons generates a config.log file. See this file when there are problems building.Sysbench 0.4.12安装以及测试CentOS 下安装7-Zip 以及常用的解压命令相关资讯      CentOS 
  • CentOS虚拟机NAT静态IP设置  (07/04/2013 17:09:32)
  • CentOS 格式化新硬盘并设置开机自  (07/04/2013 16:50:50)
  • 服务器为何用CentOS不用Ubnutu  (02/24/2013 15:19:10)
  • CentOS /usr/libexec/gconf-sanity  (07/04/2013 17:07:42)
  • 为什么我们选择CentOS而不是Debian  (06/06/2013 06:19:40)
  • 在CentOS下搭建Android 开发环境  (02/18/2013 09:14:14)
本文评论 查看全部评论 (0)
表情: 姓名: 字数