# cd /usr/local/src
# wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-2.2.1.tgz
# tar zxvf mongodb-linux-i686-2.2.1.tgz
# cp -Rf mongodb-linux-i686-2.2.1/ /usr/local/mongodb
# cd ../mongodb
# ll
total 72
-rw------- 1 root root 34520 11?? 17 21:00 GNU-AGPL-3.0
-rw------- 1 root root 1359 11?? 17 21:00 README
-rw------- 1 root root 11527 11?? 17 21:00 THIRD-PARTY-NOTICES
drwxr-xr-x 2 root root 4096 11?? 17 21:00 bin
# mkdir -p /data/mongodb
# mkdir -p /log/mongodb
# vi mongodb.conf
dbpath=/data/mongodb
logpath=/log/mongodb/mongodb.log
logappend=true
verbose=true
#bind_ip=127.0.0.1
port=27017
fork=true
# rest 옵션은 브라우저에서 접속할건지 여부, 브라우저포트는 port로 잡은 거에 +1000 한 값 (28017)
rest=true
#auth=true
#noauth=true
MONGODB_HOME 설정
# vi /etc/profile
MONGODB_HOME=/usr/local/mongodb
export MONGODB
PATH=$PATH:$MONGODB_HOME/bin
export PATH
# source /etc/profile
몽고디비 실행
# mongod --config /usr/local/mongodb/mongodb.conf
몽고디비 클라이언트 접속
# mongo localhost:27017
MongoDB shell version: 2.2.1
connecting to: localhost:27017/test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
>
브라우저에서 확인하기
http://192.168.0.205:28017/