Mongo db program_installation_guide

1,241 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,241
On SlideShare
0
From Embeds
0
Number of Embeds
168
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mongo db program_installation_guide

  1. 1. MongoDB Program Installation GuideVersion Author Abstract Release date0.1 Philip zhong Draft 2012-07-09 Tuning Operating System Parameters............................................................................................ 2 Install MongoDB Program ................................................................................................................. 3
  2. 2. Tuning Operating System Parameters1. Check kernel version,make sure version great equal 2.6.32 #cat /proc/version2. Check File System Version, make sure is EXT4 # df -Th -m|grep -i “ext4”3. Set File Descriptor Limit and User process limit #vi /etc/sysctl.conf fs.file-max=65536 #vi /etc/security/limits.conf * soft nproc 2047 --noproc max process * hard nproc 16384 * soft nofile 1024 --nofile max files * hard nofile 655364. Tuning network #vi /etc/sysctl.conf net.ipv4.ip_local_port_range=1024 65000 net.core.optmem_max = 262144 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_max = 262144 # sysctl -p5. Turn off atime for the data volume
  3. 3. # mount -o noatime -o nodiratime -o remount #your data volume # Then edit /etc/fstab and add “noatime, nodiratime” for you data volume. For example: #mount -o noatime -o nodiratime -o remount /opt # UUID=8fa0b4a0-d845-4c6d-a507-2b38a50d5607 /opt ext4 defaults,noatime,nodiratime 126. Disable NUMA #echo 0>/proc/sys/vm/zone_reclaim_modeInstall MongoDB Program 1. Add MongoDB new group and User #su - root # groupadd -g 20001 mongodb # useradd -u 20001 -g mongodb mongodb #passwd mongodb 2. Append max process and max files limitation for new user # su - mongodb # vi .bash_profile ulimit -u 16384 -n 65536 3. Install mongoDB Program #su - root # chown mongodb:mongodb /opt #su -mongodb #tar xzvf mongodb-linux-x86_64-2.0.6.tgz # mv mongodb-linux-x86_64-2.0.6 /opt/mongodb206

×