Install virtualbox in ubuntu 12.04

This installation process is run on ubuntu 12.04 precise pangolin

  • Open terminal by press key Ctrl+Alt+T
  • Type/copy these following command respectively in the terminal
    $ echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
    $ wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
    $ sudo apt-get update
    $ sudo apt-get install virtualbox-4.2
  • Now we have virtual box version 4.2 installed in our Ubuntu
Advertisements

Installing neo4j 1.9 ubuntu 12.04

for installing neo4j 1.9 community,  we need Java before installing, How to install java can be navigate in this post

this is step by step installing neo4j 1.9  community

  • Download neo4j community from here
  • Extract neo4j package by using this command
    $ tar xzvf neo4j-community-1.9.tar.gz
  • move the folder into your destination folder (I move my neo4j in /usr/local)
    $ mv neo4j-community-1.9 /usr/local
  • change folder permission so the other user can have access to read and write neo4j
    $ sudo chmod 777 /usr/local/neo4j-community-1.9
  • try to start neo4j
    $ cd /usr/local/neo4j-community-1.9
    $ bin/neo4j start

now you have neo4j installed in your ubuntu

jps Java not recognize

when installing Sun JDK, insstead of open JDK, sometimes when we type ‘jps’ in terminal, it can not be recognize as a command, so we have to add this following line in .bashrc file

alias jps='$JAVA_HOME/bin/jps | grep -v sun.tools.jps.Jps'

.bashrc file can be opened by using this command

$ nano ~/.bashrc

Installing Sun JDK 6 on Ubuntu 12.04

When I want to install hadoop, hive, R, and RHive, the dependencies is JDK, previously I use embedded java from linux package, but, it doesn’t work well, so I try to install Sun JDK downloaded from Oracle, by using the reference from here

Installing Sun JDK 7 on Ubuntu 12.04

  • Download the sun jdk 6 bin from here.
  • Make the bin file executeable:
      $ chmod +x jdk-6u32-linux-x64.bin
  • Extract the bin file:
      $ ./jdk-6u32-linux-x64.bin
  • For Ubuntu 13.04: There is no longer a jvm folder in /usr/lib, therefore create jvm folder
      $ sudo mkdir /usr/lib/jvm
  • Move extracted folder to this location:
      $ sudo mv jdk1.6.0_38 /usr/lib/jvm/jdk1.6.0_38
  • Install new java source in system:
      $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_38/bin/javac 1
      $ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_38/bin/java 1
      $ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_38/bin/javaws 1
  • Choose default java:
      $ sudo update-alternatives --config javac
      $ sudo update-alternatives --config java
      $ sudo update-alternatives --config javaws
  • java version test:
      $ java -version
  • Verify the symlinks all point to the new java location:
      $ ls -la /etc/alternatives/java*

Installing Sun JDK 7 on Ubuntu 12.04

  • Download the sun jdk 7 tar file from here
  • Extract the tar file:
      $ tar -xvzf jdk-7u11-linux-x64.tar.gz
  • For Ubuntu 13.04: There is no longer a jvm folder in /usr/lib, therefore create jvm folder
      $ sudo mkdir /usr/lib/jvm
  • Move extracted folder to this location:
      $ sudo mv jdk1.7.0_11 /usr/lib/jvm/jdk1.7.0_11
  • Install new java source in system:
      $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0_11/bin/javac 1
      $ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_11/bin/java 1
      $ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.7.0_11/bin/javaws 1
  • Choose default java:
      $ sudo update-alternatives --config javac
      $ sudo update-alternatives --config java
      $ sudo update-alternatives --config javaws
  • java version test:
      $ java -version
  • Verify the symlinks all point to the new java location:
      $ ls -la /etc/alternatives/java*

Update JAVA_HOME

JAVA_HOME configuration: Some tools require JAVA_HOME variable. You can set JAVA_HOME in Ubuntu so simple: Edit the file .bashrc under your home directory and add the following lines: (if .bashrc is hidden, click in Nautilus Menu View > Show Hidden Files)

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_11 or /usr/lib/jvm/jdk1.6.0_45
export PATH=$JAVA_HOME/bin:$PATH

or add this JAVA_HOME=/usr/lib/jvm/jdk1.7.0_11 in /etc/environment with sudo gedit /etc/environment

while installing RHive, if the libjvm.so is missing, I try to add this following line in .bashrc file, and it’s working

export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server


Open .rar file in ubuntu

.rar (Roshal ARchive) files are one of the popular data compression methods. It was developed by Eugene Roshal. RAR files may be created only with commercial software WinRAR, As WinRAR is not an open source software, support for the RAR files is not given in the Linux distributions. So Ubuntu’s archive manager can not handle .rar file. But we can extract .rar files by installing a program called unrar. To install unrar, open terminal and run this command.

sudo apt-get install unrar

So this installs the unrar in your machine and you can open .rar files by running this command –

$ unrar e file.rar (replace file.rar with your filename/path)

To extract .rar files, open terminal and run the below command,

Source :
This post is reblogged from here