tar zxvf js-1.7.0.tar.gz
cd js/src/
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
JS_DIST=/usr gmake -f Makefile.ref export
#安裝pcre
tar vxf pcre-8.12.tar.bz2
cd pcre-8.12
./configure --prefix=/usr/local/pcre --enable-utf8 --enable-unicode-properties
make && make install
#在安裝mongo的時候,提示找不到pcrecpp的頭文件的話,就將安裝的pcre的頭文件拷貝到/usr/include下面
cp /usr/local/pcre/include/* /usr/include/
3、準備安裝mongodb
tar xvf mongodb-src-r1.8.1.tar.gz
cd mongodb-src-r1.8.1
#修改mongodb-src-r1.8.1目錄下的SConstruct文件,要不然編譯的時候找不到pcre,會報錯。