Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ JDK installation under CentOS     - Use value type build better applications Swift (Programming)

- Read and write files efficiently from Apache Kafka (Server)

- Python implementation restart the router (Programming)

- Shell script to delete empty folders recursively (Linux)

- Linux System Getting Started Learning: Using yum to download the RPM package without installing (Linux)

- Android system source code and compile the kernel source code (Programming)

- Upgrading to MySQL 5.7.9 MySQL 5.6.23 (Database)

- Source code compiled by the installation program under Linux (Linux)

- How to set up FTP server on Linux (Server)

- CentOS 7 source code to compile and install Nginx process record (Server)

- Oracle can not change the tablespace to backup mode in non-archive mode (Database)

- When RHEL7 use fdisk partition, all partitions can not be used (Linux)

- Linux, Google Test (GTest) test environment to build step (Linux)

- How do I upgrade from Ubuntu 15.04 to Ubuntu 15.10 (Linux)

- How to install new fonts on Ubuntu 14.04 and 14.10 (Linux)

- Oracle and MySQL5.6 DDL comparison (Database)

- MongoDB query statistics grouping remove duplicate records (Database)

- The lambda expression Java8 (constructor references) (Programming)

- Linux firewall rules example Extracts (Linux)

- CentOS 6.7 install Nagios Tutorials (Server)

  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-

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

See JDK further information:

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



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-

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


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
- Everyone should know something about TCP (Linux)
- How to use the command line ftp upload and download files (Linux)
- Oracle multi-table query optimization (Database)
- Ubuntu 15.10 under Python + Apache + CGI fully configured (Server)
- Repair CentOS 6.4 Grub boot (Linux)
- How to cool down your Ubuntu system (Linux)
- Java Virtual Machine class loading mechanism and bytecode execution engine (Programming)
- Linux operating system security can not be ignored (Linux)
- PostgreSQL procedural language learning (Database)
- Using Linux strace command trace / debug a program commonly used options (Linux)
- Recycle Bin function realization in Linux (Linux)
- IOwait Linux system monitoring diagnostic tools (Linux)
- MySQL how to export files with the date format (Database)
- Linux Shell Scripting (Programming)
- How to use Aptik to backup and restore Apps/PPAs under ubuntu (Linux)
- Linux command binlog by filtering out the complete SQL statement (Database)
- Linux package management operations Basic entry (Linux)
- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)
- Oracle rebuild index script (Database)
- Linux System Getting Started Learning: Debian download, installation and graphical interface (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.