Introduction to installing JDK under Linux, including uninstalling OpenJDK

Introduction to installing JDK under Linux, including uninstalling OpenJDK

1. View openjdk

rpm -qa|grep jdk 

2. Delete openjdk (rpm -e --nodeps)

rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.262.b10-1.el7.x86_64

3. Check whether openjdk has been deleted (same as checking jdk)

rpm -qa|grep jdk

4. Create a java directory under usr, import the installation package into the directory and decompress the files

5. Enter the vim /etc/profile directory and edit the configuration file

export JAVA_HOME=/usr/java/jdk1.8.0_181

6. Make the file effective

source /etc/profile 

7. Check whether jdk is installed

 java -version 

8. Copy the configuration file to other virtual machines (scp -r /etc/profile root@z3:/etc/profile
) Change the blue area to the name of your virtual machine

scp -r /etc/profile root@z3:/etc/profile 

9. Copy the installation package to another virtual machine (scp -r /usr/java root@z3:/usr/java
)Blue font same as above

 scp -r /usr/java root@z3:/usr/java 

10. Use vim /etc/profile on other virtual machines to make the file effective

vim /etc/profile

This is the end of this article about installing jdk under Linux, including uninstalling OpenJDK. For more information about installing jdk under Linux and uninstalling OpenJDK, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to uninstall Linux's native openjdk and install sun jdk

<<:  A brief analysis of the underlying principles of MySQL transactions and isolation levels

>>:  CSS implements five common 2D transformations

Recommend

Some suggestions on Vue code readability

Table of contents 1. Make good use of components ...

WeChat applet realizes the effect of swiping left to delete list items

This article shares the specific code for WeChat ...

How to smoothly upgrade nginx after compiling and installing nginx

After nginx is compiled and installed and used fo...

An article to show you how to create and use Vue components

Table of contents 1. What is a component? 2. Crea...

Detailed tutorial on installing and configuring MySQL 5.7.20 under Centos7

1. Download the MySQL 5.7 installation package fr...

React-native sample code to implement the shopping cart sliding deletion effect

Basically all e-commerce projects have the functi...

Implementation of proxy_pass in nginx reverse proxy

The format is simple: proxy_pass URL; The URL inc...

How to introduce pictures more elegantly in Vue pages

Table of contents Error demonstration By computed...

How to make a centos base image

Preface Now the operating system used by my compa...

Implementation of HTML sliding floating ball menu effect

CSS Styles html,body{ width: 100%; height: 100%; ...

MySQL high availability cluster deployment and failover implementation

Table of contents 1. MHA 1. Concept 2. Compositio...

Docker nginx + https subdomain configuration detailed tutorial

Today I happened to be helping a friend move his ...

Implementing Markdown rendering in Vue single-page application

When rendering Markdown before, I used the previe...