JDK is compiled and installed under CentOS 6.6 detailed procedure

Source: Internet
Author: User

First step: Download the JDK

Http://download.oracle.com/otn-pub/java/jdk/6u35-b10/jdk-6u35-linux-i586-rpm.bin (32-bit)


Step Two: View the version of the system

Getconf Long_bit

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/6C/7A/wKioL1VKQk2C2uI_AACBAaumRmk173.jpg "title=" 003. PNG "alt=" wkiol1vkqk2c2ui_aacbaaumrmk173.jpg "/>

Step Three:

Uninstall the JDK package that comes with the service

Java-version #查看服务器是否安装过jdk


Rpm-qa |grep GCJ #查看服务器安装的jdk软件包信息

libgcj-4.4.4-13.el6.i686

java-1.5.0-gcj-1.5.0.0-29.1.el6.i686


Yum-y removejava-1.5.0-gcj-1.5.0.0-29.1.el6.i686 #卸载软件包


Fourth step: Add permissions to the JDK software execution

chmod a+x Jdk-6u35-linux-i586-rpm.bin


Fifth step: Execute Jdk-6u35-linux-i586-rpm.bin Software

./jdk-6u35-linux-i586-rpm.bin

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/7A/wKioL1VKQeeAmMpmAAM_nhU8fP4483.jpg "title=" 002. PNG "alt=" wkiol1vkqeeammpmaam_nhu8fp4483.jpg "/>

Sixth step: Add JDK to system environment variables

Cp/etc/profile/etc/profile.bak #备份当前环境变量


Vi/etc/profile #编辑, add the following at the end

Java_home=/usr/java/jdk1.6.0_35

Path= $PATH: $JAVA _home/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/x11r6/bin

Classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar

Export Java_home

Export PATH

Export CLASSPATH


Seventh step: Make the configuration file effective immediately

Source/etc/profile


Eighth step: Verifying the current JDK version

Java-version

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/7A/wKioL1VKQZ2BGmcoAAJPjh9TMus712.jpg "title=" 001. PNG "alt=" wkiol1vkqz2bgmcoaajpjh9tmus712.jpg "/>

This article is from the "Sky of Lavender" blog, be sure to keep this source http://youlei.blog.51cto.com/2669714/1643672

JDK is compiled and installed under CentOS 6.6 detailed procedure

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.