본문 바로가기
Linux/MongoDB

mongoDB 설치

by 준섭이 2023. 12. 27.
728x90

### mongoDB 다운로드 및 설치

## 설치
cd /usr/local
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.6.tgz
tar zxvf mongodb-linux-x86_64-2.6.6.tgz
mv mongodb-linux-x86_64-2.6.6 mongodb
cd mongodb
mkdir data
mkdir config
mkdir log
cd config

## 설정
vi mongodb.conf
dbpath=/usr/local/mongodb
logpath=/usr/local/mongodb/log/mongodb.log
logappend=true
port=5050
verbose=true
fork=true
rest=true

 

### 실행

/usr/local/mongodb/bin/mongod --config /usr/local/mongodb/config/mongodb.conf