Install JDK graph analysis in Ubuntu
We installed JDK in 64-bit Ubuntu and chose JDK 1.6.0 _ 32. The Installation File Name Is jdk-6u32-linux-x64.bin (this is a 64-bit system), if it is a 32-bit system also need to go to the official website to download the 32-bit JDK.
1. Copy jdk to the installation directory
(1) assume that the jdk installation file is on the desktop. The specified installation directory is/usr/local/java. However, after the system is installed, there is no java directory under/usr/local. Therefore, we need to create a java folder,
(2) switch to the desktop and perform a copy,
2. Install jdk
(1) switch to the root user,
(Note: If the authentication fails because the password is forgotten, you can first modify the password of the root user, and then perform step (1) to modify the password of the root user (4 ))
(2) run the jdk-6u30-linux-i586.bin, (5)
(Note: You may still not have the execution permission at this time, because in linux, the default file permission is 644, and even the owner does not have the execution permission. In this case, you need to change the permission, if you want to know the permissions of a file, you can go to the folder where the file is located and execute the command ls-la to view it. Here, we change the permissions of the jdk-6u30-linux-i586.bin file to 777, that is, the owner user of the file, the group user and other users have all permissions on the file, of course, it is not recommended to set permissions on the files in the system, this damages the security of linux .)
Change jdk-6u30-linux-i586.bin permissions, (6)
After changing the permission, execute step (2). When you see the situation, the installation is successful.
(3) In this case, a jdk1.6.0 _ 30 folder is added to the/usr/local/java directory. For details, see (8)
3. Configure Environment Variables
(1) Open the/etc/profile file, (9)
(2) Add the following variables:
#/Etc/profile: system-wide. profile file for the Bourne shell (sh (1 ))
# And Bourne compatible shells (bash (1), ksh (1), ash (1 ),...).
# Set java environment
Export JAVA_HOME =/usr/local/java/jdk1.6.0 _ 30
Export JRE_HOME =/usr/local/java/jdk1.6.0 _ 30/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ JAVA_HOME: $ PATH
(Note: It is recommended that the java environment of each machine be the same for the convenience of cluster work in the future .)
Generally, after changing the/etc/profile file, you need to restart the machine to make it take effect. This article introduces a method to make it take effect without restarting. (10)
This operation only works for the current conversation domain. If you want to always take effect, you need to restart the computer.
(3) check whether the java environment variable is configured successfully. (11)
Install JDK 7 In Ubuntu (with Clojure download)
Install JDK 12.04 in Ubuntu
CentOS6.3 install JDK and environment Configuration
Install JDK 8 on Ubuntu 14.04