Platinum Partner
java,news,architects,nosql,jdk,architecture,ubuntu

Ubuntu: Installing JDK and MongoDB

I've started using Ubuntu recently and I'm still getting used to the new shortcuts and others.

Since the installation was also done by me, I encountered few issues.

Following are the few things which one could encounter and I've included the links to save time.

How to install JDK on Ubuntu…

https://help.ubuntu.com/community/Java

wget http://download.oracle.com/otn-pub/java/jdk/6u34-b04/jdk-6u34-linux-i586.bin
$ chmod u+x jdk-6u34-linux-i586.bin
$ ./jdk-6u34-linux-i586.bin
$ sudo mkdir -p /usr/lib/jvm
$ sudo mv jdk1.6.0_34 /usr/lib/jvm/
$ sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jdk1.6.0_34/bin/java” 1
$ sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/lib/jvm/jdk1.6.0_34/bin/javac” 1
$ sudo update-alternatives –install “/usr/lib/mozilla/plugins/libjavaplugin.so” “mozilla-javaplugin.so” “/usr/lib/jvm/jdk1.6.0_34/jre/lib/i386/libnpjp2.so” 1
$ sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jre1.6.0_34/bin/javaws” 1

  IMPORTANT choose the java you installed as default

How to enable hibernation

http://askubuntu.com/questions/94754/how-to-enable-hibernation

/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

[Re-enable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

How to install MongoDB

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

sudo service mongodb stop

How to solve the VirtualBox Error
sudo /etc/init.d/vboxdrv setup

sudo apt-get install linux-headers-$(uname -r)

Thanks everyone who have contributed to the solutions. Without those, it is not possible for people like me to proceed further.



Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}