Openjdk install on centos7

This article demonstrates how to install openjdk on CentOS7.

1 Ready to work#

1.1 View the installable version###

$ yum -y list java-1.8*
# List currently available installation versions
Available Packages
java-1.8.0-openjdk.i686                                                                                                1:1.8.0.171-7.b10.el7                                                                           updates
java-1.8.0-openjdk.x86_64                                                                                              1:1.8.0.171-7.b10.el7                                                                           updates
............                                                                          
java-1.8.0-openjdk-devel.i686                                                                                          1:1.8.0.171-7.b10.el7                                                                           updates
java-1.8.0-openjdk-devel.x86_64                                                                                        1:1.8.0.171-7.b10.el7                                                                           updates
java-1.8.0-openjdk-devel-debug.i686                                                                                    1:1.8.0.171-7.b10.el7                                                                           updates
java-1.8.0-openjdk-devel-debug.x86_64                                                                                  1:1.8.0.171-7.b10.el7                                                                           updates

1.2 Determine which version to install###

For example: java-1.8.0-openjdk

2 Install openjdk

2.1 Install version 1.8###

$ yum install java-1.8.0-openjdk  java-1.8.0-openjdk-devel

2.2 View installation location###

$ rpm -ql java-1.8.0-openjdk

2.3 Set /etc/profile

$ vi /etc/profile
# Add the following at the end of the file
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.****export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

2.4 Effective immediately###

$ source /etc/profile

2.5 Check the installation###

$ java -version

If the installation is successful, it will display:

openjdk version "1.8.0_161"
OpenJDK Runtime Environment(build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM(build 25.161-b14, mixed mode)

**Remarks: ** Installing openjdk, when using the encryption and decryption functions of Jhipster-Registry, will simplify a little work, I will sort out the instructions in related articles.

Recommended Posts

Openjdk install on centos7
CentOS install openjdk 1.8
Install Docker on Centos7
install LNMP on centos7.4
Install Java on Centos 7
Install FFmpeg on CentOS 8
Install RabbitMQ on CentOS 7
Install Node.js on Centos
Maven install on centos7
Install MongoDB on CentOS 7
Install Surelog on CentOS8
Install Jenkins on centos7
install RabbitMQ on centos
Install RabbitMQ on CentOS 7
install Docker on centos6.5
install oracle on centos
Install Elasticsearch 6 on centos7
Install RabbitMQ on CentOS7
Install mysql online on centos
Install MySQL 8.0.16 on Linux Centos
Install docker transfer on Centos7
Install docker on Centos system
install EPEL repo on centos
1.5 Install Centos7
Install Zabbix 3.4 based on CentOS 7
install virtualbox on centos server
Install Nginx server on CentOS 7
How to install jdk1.8 on centOS7
How to install MySQL on CentOS 8
Install JDK8 in rpm on CentOS7
How to install Memcached on CentOS 8
Install MATE or XFCE on CentOS 7
How to install R on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
Install MySQL on Linux CentOS7 (Windows)
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
Centos7 uninstall openJdk, and install JDK1.8
How to install htop on CentOS 8
​Install Oracle database on CentOS Linux
How to install Elasticsearch on CentOS 8
How to install Postgresql on CentOS 8
How to install Wordpress on Centos
How to install htop on CentOS 8