linux安装jdk环境
2011-10-16 18:20
555 查看
转载自
http://www.java.com/en/download/help/linux_install.xml#install
This article applies to:
Platform(s): Red Hat Linux, SUSE Linux, Oracle Linux, Oracle Enterprise Linux, SLES
Browser(s): All Browsers
Java version(s): 6.0, 6u10+
Linux System Requirements
See supported System
Configurations for information about supported platforms, operating systems, desktop managers, and browsers.
You will also need a Pentium 166MHz or faster processor with a minimum of 75MB free disk space and a minimum of 32MB of RAM.
Note:
For downloading Java for other flavors of Linux see Java
for Ubuntu, Java
for Fedora
Follow
these steps to download and install Java for Linux.
Download
Install
Enable
and Configure
Download
Go to http://java.com and
click on the Download button
There are two types of installation packages.
Linux self extracting binary file
This file can be used to install Java in a location chosen by the user and can be installed by anyone (not only root users). As long as you are not root user, it cannot displace the system version of the Java platform suppled by Linux.
Linux RPM package
Linux RPM (Redhat Package Manager) uses RPM to install Java. In order to use this method, you need to have RPM available on your system. Otherwise use the other option.
Download the package that best suits your needs. You can download the file to any of the directories on your system.
Download and check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.
Before you download the file, notice its byte size provided on the download page on the web site.
Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
Install
Linux
self extracting binary file
Linux
RPM package
Note: The instructions below are for installing Java 6. If you're-installing another version, make sure you change the version number appropriately when you type the commands at the terminal.
To
install the Linux (self-extracting) file
Follow these instructions:
Change the permission of the file you downloaded to be executable. Type:
Verify that you have permission to execute the file. Type:
Change to the directory in which you want to install. Type:
For example, to install the software in the /usr/java/ directory, Type:
Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory
for which you have write permissions.
Run the self-extracting binary Type:
The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
Java is installed into its own directory. In this example, it is installed in the
When the installation has completed, you will see the word Done.
Verify that the
is listed under the current directory. Type:
The installation is now complete. Skip to the Enable
and Configure section.
To
install the Linux RPM file
Follow these instructions:
Become the root user by running the su command and entering the super-user password.
At the terminal: Type:
Enter the root password.
Change to the directory in which you want to install. Type:
For example, to install the software in the /usr/java/ directory, Type:
Note about root access: To install Java in a system-wide location such as/usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install Java in your home directory
or a subdirectory for which you have write permissions.
Change the permission of the file you downloaded to be executable. Type:
Start the installation process. Type:
The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
The installation file creates and runs the file
the current directory.
Verify that the
is listed under the current directory. Type:
The installation is now complete. Go to the Enable
and Configure section.
Enable
and Configure
Firefox or Mozilla
To configure the Java Plugin follow these steps:
Exit Firefox browser if it is already running.
Uninstall any previous installations of Java Plugin.
Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
Create a symbolic link to the
in the browser plugins directory
Go to the plugins sub-directory under the Firefox installation directory
Create the symbolic link
Note: If you are upgrading your Java version then before creating new symbolic link you should remove old symbolic link to enable latest downloaded Java.
To remove old symbolic link:
type
Example
If Firefox is installed at this directory:
And if the Java is installed at this directory:
Then type in the terminal window to go to the browser plug-in directory:
Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
Start the Firefox browser, or restart it if it is already up.
In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.
http://www.java.com/en/download/help/linux_install.xml#install
This article applies to:
Platform(s): Red Hat Linux, SUSE Linux, Oracle Linux, Oracle Enterprise Linux, SLES
Browser(s): All Browsers
Java version(s): 6.0, 6u10+
Linux System Requirements
See supported System
Configurations for information about supported platforms, operating systems, desktop managers, and browsers.
You will also need a Pentium 166MHz or faster processor with a minimum of 75MB free disk space and a minimum of 32MB of RAM.
Note:
For downloading Java for other flavors of Linux see Java
for Ubuntu, Java
for Fedora
Follow
these steps to download and install Java for Linux.
Download
Install
Enable
and Configure
Download
Go to http://java.com and
click on the Download button
There are two types of installation packages.
Linux self extracting binary file
This file can be used to install Java in a location chosen by the user and can be installed by anyone (not only root users). As long as you are not root user, it cannot displace the system version of the Java platform suppled by Linux.
Linux RPM package
Linux RPM (Redhat Package Manager) uses RPM to install Java. In order to use this method, you need to have RPM available on your system. Otherwise use the other option.
Download the package that best suits your needs. You can download the file to any of the directories on your system.
Download and check the download file size to ensure that you have downloaded the full, uncorrupted software bundle.
Before you download the file, notice its byte size provided on the download page on the web site.
Once the download has completed, compare that file size to the size of the downloaded file to make sure they are equal.
Install
Linux
self extracting binary file
Linux
RPM package
Note: The instructions below are for installing Java 6. If you're-installing another version, make sure you change the version number appropriately when you type the commands at the terminal.
To
install the Linux (self-extracting) file
Follow these instructions:
Change the permission of the file you downloaded to be executable. Type:
chmod a+x jre-6u<version>-linux-i586.bin
Verify that you have permission to execute the file. Type:
ls -l
Change to the directory in which you want to install. Type:
cd <directory path name>
For example, to install the software in the /usr/java/ directory, Type:
cd /usr/java/
Note about root access: To install Java in a system-wide location such as /usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install the Java in your home directory or a subdirectory
for which you have write permissions.
Run the self-extracting binary Type:
./jre-6u<version>-linux-i586.bin
The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
Java is installed into its own directory. In this example, it is installed in the
/usr/java/jre1.6.0_<version>directory.
When the installation has completed, you will see the word Done.
Verify that the
jre1.6.0_<version>sub-directory
is listed under the current directory. Type:
ls
The installation is now complete. Skip to the Enable
and Configure section.
To
install the Linux RPM file
Follow these instructions:
Become the root user by running the su command and entering the super-user password.
At the terminal: Type:
su
Enter the root password.
Change to the directory in which you want to install. Type:
cd <directory>
For example, to install the software in the /usr/java/ directory, Type:
cd /usr/java
Note about root access: To install Java in a system-wide location such as/usr/local, you must login as the root user to gain the necessary permissions. If you do not have root access, install Java in your home directory
or a subdirectory for which you have write permissions.
Change the permission of the file you downloaded to be executable. Type:
chmod a+x jre-6u<version>-linux-i586-rpm.bin
Start the installation process. Type:
./jre-6u<version>-linux-i586-rpm.bin
The license agreement is displayed. Review the agreement. Press the spacebar to display the next page. At the end, enter yes to proceed with the installation.
The installation file creates and runs the file
jre-6<version>-linux-i586.rpmin
the current directory.
Verify that the
jre1.6.0_<version>sub-directory
is listed under the current directory. Type:
ls
The installation is now complete. Go to the Enable
and Configure section.
Enable
and Configure
Firefox or Mozilla
To configure the Java Plugin follow these steps:
Exit Firefox browser if it is already running.
Uninstall any previous installations of Java Plugin.
Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
Create a symbolic link to the
libnpjp2.sofile
in the browser plugins directory
Go to the plugins sub-directory under the Firefox installation directory
cd <Firefox installation directory>/plugins
Create the symbolic link
ln -s <Java installation directory>/lib/i386/libnpjp2.so
Note: If you are upgrading your Java version then before creating new symbolic link you should remove old symbolic link to enable latest downloaded Java.
To remove old symbolic link:
type
cd <Firefox installation directory>/plugins
rm libjavaplugin_oji.so
Example
If Firefox is installed at this directory:
/usr/lib/<Firefox installation directory>
And if the Java is installed at this directory:
/usr/java/<Java installation directory>
Then type in the terminal window to go to the browser plug-in directory:
/usr/lib/<Firefox installation directory>/plugin
Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
ln -s /usr/java/<Java installation directory>/lib/i386/libnpjp2.so
Start the Firefox browser, or restart it if it is already up.
In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.
相关文章推荐
- linux查看java jdk安装路径和设置环境变量
- linux查看java jdk安装路径和设置环境变量
- Linux因为安装jdk设定环境变量无法登陆桌面解决方法
- Linux下jdk1.7.0_80安装+tomcat-7.0.81部署(VMware环境下)
- Linux环境下安装JDK
- Linux下安装JDK并设置环境变量
- linux下的Jdk安装及环境变量配置
- linux 安装 jdk 环境相关配置
- RedHat5.0Linux下安装jdk,并配置环境
- Linux基本操作系列(一):在CentOS 6.8安装JDK(Java环境)
- linux环境下jdk的安装
- [Linux]在Linux上部署Java开发环境笔记(二):Linux中安装JDK6.0
- 如何在Linux环境下安装JDK1.6和Tomcat6
- linux查看java jdk jre安装路径和设置环境变量()
- Linux环境下安装JDK
- linux 环境下JDK的安装+环境变量配置
- linux下安装java jdk及环境变量配置
- Linux系统下JDK安装,Java环境变量配置
- 二、java运行环境按照之-linux centos下安装jdk步骤【rpm安装方式】
- linux下安装jdk环境变量