MongoDB 2.6 does not start on Ubuntu 15.10 and How To Install MongoDB In Ubuntu 15.10 Easily
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
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
Adding the following lines preceding exit 0 in /etc/rc.local file
if test -f /sys/kernel/mm/transparent_hugepage/khugepaged/defrag; then
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
# 5. sudo reboot
# 6. mongo
service
$ sudo service mongod start
if you want uninstall mongodb then ...............
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
Comments
Post a Comment