Tuto




  This Tutoriel was checked for the last time the : 23/03/2016

 23/03/2016

 James B.

 2 minutes

 Information:


  • Terminal:
    
     sudo apt-get install --assume-yes wget
     wget -P /tmp/ http://downloads.mongodb.org/linux/mongodb-linux-x86_64-3.0.1.tgz
     tar -zxvf /tmp/mongodb-linux-x86_64-3.0.1.tgz --directory $HOME
     mkdir -p /data/db
     export PATH=$HOME/mongodb-linux-x86_64-3.0.1/bin:$PATH
     echo 'export PATH=$HOME/mongodb-linux-x86_64-3.0.1/bin:$PATH' >> ~/.bashrc
     mkdir -p /var/log/mongodb
  • Edit file : /root/mongodb-linux-x86_64-3.0.1/mongodb.conf
  • Open it :
    - with VIM : vim.tiny /root/mongodb-linux-x86_64-3.0.1/mongodb.conf
    OR
    - from Cloud9 terminal : c9 open /root/mongodb-linux-x86_64-3.0.1/mongodb.conf

    Set file content :
    #where to log
    logpath=/var/log/mongodb/mongodb.log
    
    logappend=true
    

  • Terminal:
    
     mongod --config $HOME/mongodb-linux-x86_64-3.0.1/mongodb.conf &