Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ JDK installation under CentOS     - C # compiler to achieve functional use in the runtime (Programming)

- Make full use of the Raspberry Pi SD card space (Linux)

- To set up the printer use Nagios Monitoring Server (Server)

- Java in the final qualifier (Programming)

- How to install and configure in Ubuntu 14.10 'Weather Information Indicator' (Linux)

- VNC connection VMware vSphere ESXi 5.5 (Linux)

- The Sublime Text 3 configuration file (Linux)

- Tmux Crash Course: Tips and adjustment (Linux)

- Batch download files using the explorer under Windows Server 2008 R2 (Server)

- MySQL full-index scan bug (Database)

- Install Java JDK 8 in CentOS 7 / 6.5 / 6.4 (Linux)

- Java to create a table in the database SYBase (Database)

- Linux smart small switch rfkill (Linux)

- Heartbeat (v1, v2, pacemaker) cluster components Overview (Server)

- The wrong in Linux: too many open files (Linux)

- How to use the on-screen keyboard in Linux (Linux)

- How to manage start-up applications in Ubuntu (Linux)

- Get and Post requests Comments (Linux)

- Java memory analysis tool uses detailed MAT (Programming)

- Android memory optimization of the memory cache (Linux)

 
         
  JDK installation under CentOS
     
  Add Date : 2017-02-07      
         
         
         
  Under CentOS JDK installation

Installation: rpm installation
Software: jdk-7-linux-x64.rpm

The original version of the inspection system

[Root @ abctest~] # java -version

java version "1.6.0_24"

OpenJDK Runtime Environment (IcedTea6 1.11.1) (rhel-1.45.1.11.1.el6-x86_64)

OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

See JDK further information:

[Root @ abctest~] # rpm -qa | grep java

tzdata-java-2012c-1.el6.noarch

java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64

Uninstall OpenJDK, do the following:

[Root @ abctest~] # rpm -e --nodeps tzdata-java-2012c-1.el6.noarch

[Root @ abctest~] # rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64

Install the JDK

Upload a new jdk-7-linux-x64.rpm software to the / usr / local / perform the following actions:

[Root @ abctestlocal] # rpm -ivh jdk-7-linux-x64.rpm

JDK is installed by default in / usr / java in.

Verifying the Installation

Do the following to view the information properly:

[Root @ abctest bin] # java

[Root @ abctest bin] # javac

[Root @ abctest bin] # java -version

java version "1.7.0"

Java (TM) SE Runtime Environment (build 1.7.0-b147)

Java HotSpot (TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

Congratulations, the installation was successful!

Configuration environment variable

I do not have to configure the environment variable machine installing jdk-7-linux-x64.rpm can also perform normal javac, java -version operation, so I do not have to configure JDK environment variable. But the need for future discomfort, here is the record about how to configure, operate as follows:

Modify system environment variables file

vi + / etc / profile

Append the following to the file contents inside:

JAVA_HOME = / usr / java / jdk1.7.0

JRE_HOME = / usr / java / jdk1.7.0 / jre

PATH = $ PATH: $ JAVA_HOME / bin: $ JRE_HOME / bin

CLASSPATH =:. $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar: $ JRE_HOME / lib

export JAVA_HOME JRE_HOME PATH CLASSPATH

Changes to take effect

 [Root @ abctest local] # source / etc / profile // changes to take effect immediately

[Root @ abctest local] # echo $ PATH // View PATH value

View system environmental status

[Root @ abctest ~] # echo $ PATH

/usr/local/cmake/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin: /usr/java/jdk1.7.0/bin:/usr/java/jdk1.7.0/jre/bin:/root/bin
     
         
         
         
  More:      
 
- How to use the Vault secure password storage and API key (Linux)
- Nginx reverse proxy and self-signed https (Server)
- You know the difference between URL, URI and URN among you (Linux)
- Linux Operating System Security Management Experience (Linux)
- Hadoop1.2.1 plug compilation (Server)
- Spring classic face questions Share (Programming)
- Linux non-root user uses less than 1024 ports (Linux)
- Number JavaScript type system (Programming)
- To update Python version under CentOS system (Linux)
- Why you should choose Python Programming (Programming)
- Iptables principle (Linux)
- How to create a cloud encrypted file system in Linux systems (Linux)
- Analysis of native Java keywords (Programming)
- Linux ./configure --prefix command (Linux)
- xargs Detailed description (Linux)
- Python Basics Tutorial - lambda keyword (Programming)
- Depth understanding of the use of Spring Redis (Programming)
- Linux uses a screen recording under RecordMyDesktop (Linux)
- Why do you need close contact Rust 1.0 (Programming)
- IntelliJ IDEA run in Mac10.9 and JDK7 environment (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.