file down :http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.9.tgz
http://downloads.mongodb.org/linux/mongodb-linux-x86_64-latest.tgz?_ga=2.203685907.2005591995.1522833621-772625683.1520840379 //4.1.4
/usr/local/
tar zxvf mongodb-linux-x86_64-2.4..tgz
mv mongodb-linux-x86_64-2.4. mongodb
cd mongodb
mkdir db
mkdir logs
cd bin
vim mongodb.conf
conf:
dbpath=/usr/local/mongodb/db
logpath=/usr/local/mongodb/logs/mongodb.log
port=
fork=true
nohttpinterface=true
bindip and conf:
/usr/local/mongodb/bin/mongod --bind_ip localhost -f /usr/local/mongodb/bin/mongodb.conf
ok
syntax:
语法应该是基于面向对象的:
show dbs db.version(); db.basic_data.findOne();
....