Install Sun Java 7.x on Debian Squeeze

It might look weird to install Sun Java from a Ubuntu Repo- however it works at least it worked for my installation-

$ su root
# echo "deb precise main" > /etc/apt/sources.list.d/webupd8team-java.list
# echo "deb-src precise main" >> /etc/apt/sources.list.d/webupd8team-java.list
# apt-key adv –keyserver –recv-keys EEA14886
# apt-get update
# apt-get install oracle-java7-installer
# java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
# exit


How to install Java SDK (1.6) and Apache Ant (1.7) on CentOS

I had enough with some package managers or alternative ways of installing Java on a server which is running CentOS (RHEL) 4.4 . I think the most straight forward way is the following. I promise by the end of this post you will have Java and Apache Ant running on you server!


Step 1: Download Java SDK for Linux (I have used the .bin file)

Step 2: upload the .bin file to your server – I have picked the following folder /usr/lib/
So it would be /usr/lib/jdk-6u1-linux-i586.bin (this is JDK1.6 update 1 for my case maybe when you read this post is jdk1.7).

Step 3: Unpack – extract the bin file contents of the bin file

    > chmod 777 jdk-6u1-linux-i586.bin
    > ./jdk-6u1-linux-i586.bin

Step 4: Follow the instructions and type yes when prompted to do so! After unpacking you should have the following folder /usr/lib/jdk1.6.0_01/ Continue reading “How to install Java SDK (1.6) and Apache Ant (1.7) on CentOS” »