NoSQL Zone is brought to you in partnership with:

Computer Science Engineer having more than 16 years of experience, predominantly in the Enterprise Product Development Space. Professionally started with LabWindows, then to X-Windows/Motif and landed in using Java. Primitive experience in VC++ and .Net. Making hands dirty with DSLs in the free time (?) For more about me, visit http://jagannathan.info Jagannathan is a DZone MVB and is not an employee of DZone and has posted 5 posts at DZone. You can read more from them at their website. View Full User Profile

Ubuntu: Installing JDK and MongoDB

03.22.2013
| 2984 views |
  • submit to reddit

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 Jagannathan Asokan, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Tomasz O. replied on Fri, 2013/03/22 - 6:30am

It's sooo.. useful, I'm glad that someone finally described this whole complicated process. You could google for years without finding anything close to what you have just written. Thank you man, thank you India!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.