curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.2.9.tgz
tar -zxvf mongodb-linux-x86_64-3.2.9.tgz
mkdir -p ~/mongodb-3.2.9
mv mongodb-linux-x86_64-3.2.9 ~/mongodb-3.2.9
export PATH=<mongodb-install-directory>/bin:$PATH
Before you start MongoDB for the first time, create the directory to which the mongod process will write data.
By default, the mongod process uses the /data/db directory.
If you create a directory other than this one, you must specify that directory in the dbpath option when starting the mongod process later in this procedure.
mkdir -p /data/mongodb
下载并安装apr(Apache Portable Runtime )
tar zxvf apr-1.5.1.tar.gz ./configure --prefix=/home/xxx/programs/apr make make install
下载并安装apr-util
./configure --prefix=/home/xxx/programs/a