Mongodb的构建是巨大的

时间:2014-05-08 19:59:51

标签: mongodb

我需要从源代码构建mongodb以获得SSL支持。

我按照我能找到的各种来源运行了以下命令集:

sudo git clone git://github.com/mongodb/mongo.git
cd mongo/
git checkout r2.6.0
sudo git checkout r2.6.0
sudo scons --ssl all

这种构建没有重大问题(虽然需要时间),但输出文件很大:

-rwxr-xr-x  1 root root 361M May  2 12:28 bsondump
-rwxr-xr-x  1 root root 148M May  1 15:07 mongo
-rwxr-xr-x  1 root root 359M May  2 12:54 mongobridge
-rwxr-xr-x  1 root root 365M May  2 10:30 mongod
-rwxr-xr-x  1 root root 362M May  2 11:21 mongodump
-rwxr-xr-x  1 root root 361M May  2 11:40 mongoexport
-rwxr-xr-x  1 root root 362M May  2 12:21 mongofiles
-rwxr-xr-x  1 root root 361M May  2 11:48 mongoimport
-rwxr-xr-x  1 root root 361M May  2 12:13 mongooplog
-rwxr-xr-x  1 root root 358M May  2 12:35 mongoperf
-rwxr-xr-x  1 root root 362M May  2 11:30 mongorestore
-rwxr-xr-x  1 root root 248M May  2 11:07 mongos
-rwxr-xr-x  1 root root 362M May  2 11:57 mongostat
-rwxr-xr-x  1 root root 361M May  2 12:04 mongotop
-rwxr-xr-x  1 root root 361M May  2 12:46 perftest
-rwxr-xr-x  1 root root 455M May  2 14:54 test

我在这里错过了什么吗?

1 个答案:

答案 0 :(得分:3)

原始构建生成包含调试符号的二进制文件,您可以使用strip命令删除它们,如下所示:

strip mongod