27 July 2015

setup

  1. systemd to upstart-sysv

         # ubuntu 15.04 advanced the default init system
         # from `upstart` to systemd
    
         # switch back to `upstart`
         $ sudo apt-get install upstart-sysv
         $ sudo reboot
    
  2. install

         # 1. import public key
         $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
         # 2. create a list file for mongodb
         $ sudo echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
         # 3. reload local package database
         $ sudo apt-get update
         # 4. install
         sudo('apt-get install -y mongodb-org')
    
  3. service

         $ sudo service mongod start
    
  4. uninstall

         # 1. stop mongodb
         $ sudo service mongod stop
         # 2. remove package
         $ sudo apt-get purge mongodb-org*
         # 3. remove data directories
         $ sudo rm -r /var/log/mongodb
         $ sudo rm -r /var/lib/mongodb
    

references

  1. support for ubuntu 15.04

  2. install mongodb on ubuntu



blog comments powered by Disqus