Install and Manage Java Packages on CentOS

Provides a tutorial example on how to install OpenJDK 11 JRE (Java Runtime Environment) on CentOS 8 systems using 'dnf/yum' as the package manager.

If you want to run Java applications on CentOS Linux systems, you can follow what I did on my CentOS 8 computer:

1. Login as "herong", who has admin privileges.

2. Run "dnf search" to find available Java packages. I see OpenJDK 1.8 and OpenJDK 11 packages available for installation:

herong$ dnf search java

java-11-openjdk.x86_64 : OpenJDK Runtime Environment 11
java-11-openjdk-src.x86_64 : OpenJDK Source Bundle 11
java-11-openjdk-demo.x86_64 : OpenJDK Demos 11
java-11-openjdk-devel.x86_64 : OpenJDK Development Environment 11
java-11-openjdk-jmods.x86_64 : JMods for OpenJDK 11
java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment 8
java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle 8
java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos 8
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment 8
java-1.8.0-openjdk-javadoc.noarch : OpenJDK 8 API documentation
java-1.8.0-openjdk-headless.x86_64 : OpenJDK Headless Runtime Environment 8

3. Install the OpenJDK 11 JRE (Java Runtime Environment):

herong$ sudo dnf install java-11-openjdk

Dependencies resolved.
 Package                    Architecture  Version
 java-11-openjdk            x86_64        1:
Installing dependencies:
 copy-jdk-configs           noarch        3.7-1.el8
 java-11-openjdk-headless   x86_64        1:
 javapackages-filesystem    noarch        5.3.0-1.module_el8.0.0+11...
 ttmkfdir                   x86_64        3.0.9-54.el8
 tzdata-java                noarch        2019c-1.el8
 xorg-x11-fonts-Type1       noarch        7.5-19.el8
 lksctp-tools               x86_64        1.0.18-3.el8
Enabling module streams:
 javapackages-runtime                     201801



3. Verify OpenJDK 11 JRE (Java Runtime Environment):

herong$ java -version

openjdk version "11.0.6" 2020-01-14 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.6+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10-LTS, mixed mode, sharing)

Cool! I have installed OpenJDK 11 JRE on my CentOS computer without any issues.

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

Software Package Manager on CentOS - DNF and YUM

 What Is DNF

 Manage DNF Package Repositories

 What Is YUM

 What Is RPM

 What Is

Install and Manage Java Packages on CentOS

 Install and Manage Perl Packages on CentOS

 Install "git-core" for GitHub Packages on CentOS

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

 GCC - C/C++ Compiler

 Conda - Environment and Package Manager

 Tools and Utilities


 Full Version in PDF/EPUB