2013年11月27日

mongodb on AWS EC2

Attach partition to EC2 sever cat /proc/partitions major minor #blocks name 202 1 8388608 xvda1 202 112 5242880 xvdh 202 96 5242880 xvdg 202 80 52428800 xvdf sudo vi /etc/fstab /dev/xvdf /data ext4 defaults,auto,noatime,noexec 0 0 /dev/xvdg /journal ext4 defaults,auto,noatime,noexec 0 0 /dev/xvdh /log ext4 defaults,auto,noatime,noexec 0 0 sudo mount /data sudo mount /log sudo mount /journal sudo chown mongod:mongod /data /journal /log sudo ln -s /journal /data/journal sudo vi /etc/mongod.conf
/etc/mongod.conf dbpath = /data logpath = /log/mongod.log and more!! please refer reference 1

check mongodb log tail /log/mongod.log
start mongod sudo service start mongod

reference 1
reference 2




沒有留言:

張貼留言