Ubuntu 10.04+ 上安装 MongoDB 数据库
MongoDB是一个基于分布式文件存储的数据库,与Redis 同样,基于NoSql 技术, 由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案,
下面为在Ubuntu 上安装及运行mongodb 过程。
1. 依赖包安装,mongodb 用boost库,js引擎(spider monkey 或者V8), 正则表达式库pcre.
apt-get -y install tcsh git-core scons g++ apt-get -y install libpcre++-dev libboost-dev libreadline-dev xulrunner-1.9.2-dev apt-get -y install libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev
2.编译
2.1 获取源码,可以获取主分支,也可以编译子分支
git clone git://github.com/mongodb/mongo.git cd mongo # pick a stable version unless doing true dev git tag -l # Switch to a stable branch (unless doing development) -- # an even second number indicates "stable". (Although with # sharding you will want the latest if the latest is less # than 1.6.0.) For example: git checkout r2.0.0
- 编译
scons all
- 安装
--prefix 指定 mongodb 库存放位置
scons --prefix=/opt/mongo install
# sudo mkdir -p /data/db
# sudo ./mongod
相关推荐
lbyd0 2020-11-17
BigYellow 2020-11-16
sushuanglei 2020-11-12
我心似明月 2020-11-09
zhushenghan 2020-11-09
sunnnyduan 2020-10-16
不要皱眉 2020-10-14
xiaohai 2020-09-29
songxiugongwang 2020-09-22
萌亖 2020-09-17
LuckyLXG 2020-09-08
sdmzhu 2020-09-01
mkhhxxttxs 2020-09-16
xiaohai 2020-09-16
newcome 2020-09-09
jaylong 2020-08-19
大秦铁骑 2020-08-19
thatway 2020-08-19