Friday, 20 December 2013

Find to install Java6 on Ubuntu

STEP 1: DOWNLOAD ORACLE JAVA.

When new versions of Java are released, they are featured on the main Java download page.
If Java 6 update 45 is no longer featured, you can find the download by following the Previous Releases link found on the main download page.
Open the Java download page
in your browser and download both jdk-6u45-linux-i586.bin and jre-6u45-linux-i586.bin
Make a note of the folder to which you downloaded the files.

STEP 2: CREATE THE INSTALLATION FOLDER.

The usr/lib/jvm is the default installation location of the Java JDK and the Java JRE. Enter the following command in your console:

1
sudo mkdir -p /usr/lib/jvm
The –p option ensures that all folders in the mkdir path are created.

STEP 3: NAVIGATE TO THE FOLDER TO WHICH YOU DOWNLOADED THE JAVA INSTALLATION FILES.

If you downloaded the files to your Home folder, you can use the following command:
1 cd ~/

STEP 4: MOVE THE DOWNLOADED FILES TO THE INSTALLATION FOLDER.
1 sudo mv jdk-6u45-linux-i586.bin /usr/lib/jvm
2 sudo mv jre-6u45-linux-i586.bin /usr/lib/jvm

STEP 5: CHANGE TO THE INSTALLATION FOLDER.
1 cd /usr/lib/jvm

STEP 6: MAKE THE DOWNLOADED BINARIES EXECUTABLE.
1 sudo chmod u+x jdk-6u45-linux-i586.bin
2 sudo chmod u+x jre-6u45-linux-i586.bin

STEP 7: EXTRACT BOTH COMPRESSED BINARY FILES.
1 sudo ./jdk-6u45-linux-i586.bin
2 sudo ./jre-6u45-linux-i586.bin

STEP 8: CHECK YOUR EXTRACTED FOLDER NAMES.

1 ls -l
Response:
1 jdk1.6.0_45
2 jre1.6.0_45

STEP 9: INFORM UBUNTU WHERE YOUR JAVA INSTALLATION IS LOCATED.
1 sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_45/bin/java" 1
2 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_45/bin/javac" 1

STEP 10: INFORM UBUNTU THAT THIS IS YOUR DEFAULT JAVA INSTALLATION.
1 sudo update-alternatives --set java /usr/lib/jvm/jre1.6.0_45/bin/java
2 sudo update-alternatives --set javac /usr/lib/jvm/jdk1.6.0_45/bin/javac

STEP 11: UPDATE YOUR SYSTEM-WIDE PATH.
Edit your /etc/profile file using:

1 sudo nano /etc/profile
Add the following entries to the bottom of the file:

1 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
2 export JAVA_HOME
3 export PATH
Save your changes using CTRL + X.

STEP 12: RELOAD YOUR SYSTEM-WIDE PATH.
1 . /etc/profile

STEP 13: REBOOT YOUR UBUNTU SYSTEM.
1 sudo reboot

STEP 14: TEST YOUR NEW INSTALLATION.
1 java –version
Response:
1 java version "1.6.0_45"
2 Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
3 Java HotSpot(TM) Client VM (build 20.12-b01, mixed mode, sharing)

1 javac –version
Response:
1 javac 1.6.0_45

Find to install Java6 on Ubuntu12.04

STEP 1: DOWNLOAD ORACLE JAVA.

When new versions of Java are released, they are featured on the main Java download page.
If Java 6 update 45 is no longer featured, you can find the download by following the Previous Releases link found on the main download page.
Open the Java download page
in your browser and download both jdk-6u45-linux-i586.bin and jre-6u45-linux-i586.bin
Make a note of the folder to which you downloaded the files.

STEP 2: CREATE THE INSTALLATION FOLDER.

The usr/lib/jvm is the default installation location of the Java JDK and the Java JRE. Enter the following command in your console:

1
sudo mkdir -p /usr/lib/jvm
The –p option ensures that all folders in the mkdir path are created.

STEP 3: NAVIGATE TO THE FOLDER TO WHICH YOU DOWNLOADED THE JAVA INSTALLATION FILES.

If you downloaded the files to your Home folder, you can use the following command:
1 cd ~/

STEP 4: MOVE THE DOWNLOADED FILES TO THE INSTALLATION FOLDER.
1 sudo mv jdk-6u45-linux-i586.bin /usr/lib/jvm
2 sudo mv jre-6u45-linux-i586.bin /usr/lib/jvm

STEP 5: CHANGE TO THE INSTALLATION FOLDER.
1 cd /usr/lib/jvm

STEP 6: MAKE THE DOWNLOADED BINARIES EXECUTABLE.
1 sudo chmod u+x jdk-6u45-linux-i586.bin
2 sudo chmod u+x jre-6u45-linux-i586.bin

STEP 7: EXTRACT BOTH COMPRESSED BINARY FILES.
1 sudo ./jdk-6u45-linux-i586.bin
2 sudo ./jre-6u45-linux-i586.bin

STEP 8: CHECK YOUR EXTRACTED FOLDER NAMES.

1 ls -l
Response:
1 jdk1.6.0_45
2 jre1.6.0_45

STEP 9: INFORM UBUNTU WHERE YOUR JAVA INSTALLATION IS LOCATED.
1 sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_45/bin/java" 1
2 sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_45/bin/javac" 1

STEP 10: INFORM UBUNTU THAT THIS IS YOUR DEFAULT JAVA INSTALLATION.
1 sudo update-alternatives --set java /usr/lib/jvm/jre1.6.0_45/bin/java
2 sudo update-alternatives --set javac /usr/lib/jvm/jdk1.6.0_45/bin/javac

STEP 11: UPDATE YOUR SYSTEM-WIDE PATH.
Edit your /etc/profile file using:

1 sudo nano /etc/profile
Add the following entries to the bottom of the file:

1 PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
2 export JAVA_HOME
3 export PATH
Save your changes using CTRL + X.

STEP 12: RELOAD YOUR SYSTEM-WIDE PATH.
1 . /etc/profile

STEP 13: REBOOT YOUR UBUNTU SYSTEM.
1 sudo reboot

STEP 14: TEST YOUR NEW INSTALLATION.
1 java –version
Response:
1 java version "1.6.0_45"
2 Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
3 Java HotSpot(TM) Client VM (build 20.12-b01, mixed mode, sharing)

1 javac –version
Response:
1 javac 1.6.0_45

Find to install Tomcat6 on Ubuntu 12.04

STEP 1: INSTALL THE ORACLE JDK, IF YOU HAVE NOT DONE SO ALREADY
Follow the installation instructions in How to Install Oracle Java 6 update 37 on Ubuntu 12.04 Linux.

STEP 2: INSTALL THE TOMCAT6 PACKAGE
During this step, Tomcat and OpenJDK will be installed. We will configure Tomcat in a later step to use the Oracle JDK instead.
Run the following commands in your console:
1 sudo apt-get update
2 sudo apt-get install tomcat6

STEP 3: STOP THE TOMCAT6 SERVICE
Run the following command in your console to stop the tomcat6 service:
1 sudo service tomcat6 stop
Response:
1 Stopping Tomcat servlet engine tomcat6 [ OK ]

STEP 4: EDIT THE TOMCAT6 DEFAULT START-UP CONFIGURATION FILE
Run the following command in your console to edit the default tomcat6 start-up configuration file:
1 sudo nano /etc/default/tomcat6

Change the JAVA_HOME option to the following and remove the starting #:
1 JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
Save the file and you are done. Tomcat will now start using the Oracle JDK instead of the OpenJDK.

STEP 5: START THE TOMCAT6 SERVICE
Run the following command in your console to start the tomcat6 service:
1 sudo service tomcat6 start

STEP 6: OPEN THE DEFAULT TOMCAT PORT IN YOUR FIREWALL
You only need to run this command if you have a firewall enabled:
1 sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

STEP 7: DOWNLOAD THE FILES AND COPY THE FILES

Tomcat 6 Downloads link
http://tomcat.apache.org/download-60.cgi

extract that tar file copy all files into /var/lib/tomcat6/webapps
1.examples
2.host-manager
3.manager
4.ROOT

STEP:8 ADD the Fallowing Lines in tomcat-users.xml

<tomcat-users>


<role rolename="manager"/>

<user username="Admin" password="tomcat" roles="manager"/>

</tomcat-users>

STEP 8: TEST YOUR INSTALLATION
Navigate your browser to http://localhost:8080. If you see “It works!”, the installation was successful.



STEP 9: REBOOT YOUR SYSTEM
This step is necessary to test whether your tomcat6 server automatically starts when Ubuntu starts:
1 sudo reboot

STEP 10: TEST YOUR INSTALLATION

Navigate your browser to http://localhost:8080. If you see “It works!”, you have confirmed that the installation was successful.

Find to install Tomcat6 on Ubuntu

STEP 1: INSTALL THE ORACLE JDK, IF YOU HAVE NOT DONE SO ALREADY
Follow the installation instructions in How to Install Oracle Java 6 update 37 on Ubuntu 12.04 Linux.

STEP 2: INSTALL THE TOMCAT6 PACKAGE
During this step, Tomcat and OpenJDK will be installed. We will configure Tomcat in a later step to use the Oracle JDK instead.
Run the following commands in your console:
1 sudo apt-get update
2 sudo apt-get install tomcat6

STEP 3: STOP THE TOMCAT6 SERVICE
Run the following command in your console to stop the tomcat6 service:
1 sudo service tomcat6 stop
Response:
1 Stopping Tomcat servlet engine tomcat6 [ OK ]

STEP 4: EDIT THE TOMCAT6 DEFAULT START-UP CONFIGURATION FILE
Run the following command in your console to edit the default tomcat6 start-up configuration file:
1 sudo nano /etc/default/tomcat6

Change the JAVA_HOME option to the following and remove the starting #:
1 JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
Save the file and you are done. Tomcat will now start using the Oracle JDK instead of the OpenJDK.

STEP 5: START THE TOMCAT6 SERVICE
Run the following command in your console to start the tomcat6 service:
1 sudo service tomcat6 start

STEP 6: OPEN THE DEFAULT TOMCAT PORT IN YOUR FIREWALL
You only need to run this command if you have a firewall enabled:
1 sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

STEP 7: DOWNLOAD THE FILES AND COPY THE FILES

Tomcat 6 Downloads link
http://tomcat.apache.org/download-60.cgi

extract that tar file copy all files into /var/lib/tomcat6/webapps
1.examples
2.host-manager
3.manager
4.ROOT

STEP:8 ADD the Fallowing Lines in tomcat-users.xml

<tomcat-users>


<role rolename="manager"/>

<user username="Admin" password="tomcat" roles="manager"/>

</tomcat-users>

STEP 8: TEST YOUR INSTALLATION
Navigate your browser to http://localhost:8080. If you see “It works!”, the installation was successful.



STEP 9: REBOOT YOUR SYSTEM
This step is necessary to test whether your tomcat6 server automatically starts when Ubuntu starts:
1 sudo reboot

STEP 10: TEST YOUR INSTALLATION

Navigate your browser to http://localhost:8080. If you see “It works!”, you have confirmed that the installation was successful.

Find to install Tomcat6 on Ubuntu12.10

STEP 1: INSTALL THE ORACLE JDK, IF YOU HAVE NOT DONE SO ALREADY
Follow the installation instructions in How to Install Oracle Java 6 update 37 on Ubuntu 12.04 Linux.

STEP 2: INSTALL THE TOMCAT6 PACKAGE
During this step, Tomcat and OpenJDK will be installed. We will configure Tomcat in a later step to use the Oracle JDK instead.
Run the following commands in your console:
1 sudo apt-get update
2 sudo apt-get install tomcat6

STEP 3: STOP THE TOMCAT6 SERVICE
Run the following command in your console to stop the tomcat6 service:
1 sudo service tomcat6 stop
Response:
1 Stopping Tomcat servlet engine tomcat6 [ OK ]

STEP 4: EDIT THE TOMCAT6 DEFAULT START-UP CONFIGURATION FILE
Run the following command in your console to edit the default tomcat6 start-up configuration file:
1 sudo nano /etc/default/tomcat6

Change the JAVA_HOME option to the following and remove the starting #:
1 JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
Save the file and you are done. Tomcat will now start using the Oracle JDK instead of the OpenJDK.

STEP 5: START THE TOMCAT6 SERVICE
Run the following command in your console to start the tomcat6 service:
1 sudo service tomcat6 start

STEP 6: OPEN THE DEFAULT TOMCAT PORT IN YOUR FIREWALL
You only need to run this command if you have a firewall enabled:
1 sudo iptables -A INPUT -p tcp --dport 8080 -j ACCEPT

STEP 7: DOWNLOAD THE FILES AND COPY THE FILES

Tomcat 6 Downloads link
http://tomcat.apache.org/download-60.cgi

extract that tar file copy all files into /var/lib/tomcat6/webapps
1.examples
2.host-manager
3.manager
4.ROOT

STEP:8 ADD the Fallowing Lines in tomcat-users.xml

<tomcat-users>


<role rolename="manager"/>

<user username="Admin" password="tomcat" roles="manager"/>

</tomcat-users>

STEP 8: TEST YOUR INSTALLATION
Navigate your browser to http://localhost:8080. If you see “It works!”, the installation was successful.



STEP 9: REBOOT YOUR SYSTEM
This step is necessary to test whether your tomcat6 server automatically starts when Ubuntu starts:
1 sudo reboot

STEP 10: TEST YOUR INSTALLATION

Navigate your browser to http://localhost:8080. If you see “It works!”, you have confirmed that the installation was successful.