中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

卸載linux自帶openjdk并安裝sun jdk的方法

發布時間:2020-07-11 10:08:33 來源:億速云 閱讀:186 作者:清晨 欄目:開發技術

不懂卸載linux自帶openjdk并安裝sun jdk的方法?其實想解決這個問題也不難,下面讓小編帶著大家一起學習怎么去解決,希望大家閱讀完這篇文章后大所收獲。

檢查一下系統中的jdk版本

[hadoop@master ~]$ java -version
openjdk version "1.8.0_222-ea"
OpenJDK Runtime Environment (build 1.8.0_222-ea-b03)
OpenJDK 64-Bit Server VM (build 25.222-b03, mixed mode)

檢測jdk安裝包

[hadoop@master ~]$ rpm -qa | grep java
python-javapackages-3.4.1-11.el7.noarch
javapackages-tools-3.4.1-11.el7.noarch
tzdata-java-2019b-1.el7.noarch
java-1.8.0-openjdk-headless-1.8.0.222.b03-1.el7.x86_64
java-1.8.0-openjdk-1.8.0.222.b03-1.el7.x86_64
[hadoop@master ~]$

卸載openjdk

[hadoop@master ~]$ sudo yum -y remove *openjdk*
[sudo] password for hadoop:
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.222.b03-1.el7 will be erased
--> Processing Dependency: java >= 1.5 for package: jline-1.0-8.el7.noarch
--> Processing Dependency: java-1.8.0-openjdk for package: icedtea-web-1.7.1-1.el7.x86_64
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.222.b03-1.el7 will be erased
--> Running transaction check
---> Package icedtea-web.x86_64 0:1.7.1-1.el7 will be erased
---> Package jline.noarch 0:1.0-8.el7 will be erased
--> Processing Dependency: jline for package: rhino-1.7R5-1.el7.noarch
--> Running transaction check
---> Package rhino.noarch 0:1.7R5-1.el7 will be erased
--> Finished Dependency Resolution
ol7_UEKR5/x86_64                                         | 2.5 kB 00:00:00 
ol7_latest/x86_64                                         | 2.7 kB 00:00:00 
 
Dependencies Resolved
 
==========================================================================================================================================================================================================
 Package             Arch         Version            Repository         Size
==========================================================================================================================================================================================================
Removing:
 java-1.8.0-openjdk           x86_64        1:1.8.0.222.b03-1.el7        @anaconda/7.7        642 k
 java-1.8.0-openjdk-headless        x86_64        1:1.8.0.222.b03-1.el7        @anaconda/7.7        106 M
Removing for dependencies:
 icedtea-web            x86_64        1.7.1-1.el7           @anaconda/7.7        2.3 M
 jline              noarch        1.0-8.el7           @anaconda/7.7         72 k
 rhino              noarch        1.7R5-1.el7           @anaconda/7.7        1.1 M
 
Transaction Summary
==========================================================================================================================================================================================================
Remove 2 Packages (+3 Dependent packages)
 
Installed size: 110 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
 Erasing : icedtea-web-1.7.1-1.el7.x86_64                                       1/5
 Erasing : rhino-1.7R5-1.el7.noarch                                        2/5
 Erasing : jline-1.0-8.el7.noarch                                         3/5
 Erasing : 1:java-1.8.0-openjdk-1.8.0.222.b03-1.el7.x86_64                                  4/5
 Erasing : 1:java-1.8.0-openjdk-headless-1.8.0.222.b03-1.el7.x86_64                                5/5
 Verifying : 1:java-1.8.0-openjdk-headless-1.8.0.222.b03-1.el7.x86_64                                1/5
 Verifying : 1:java-1.8.0-openjdk-1.8.0.222.b03-1.el7.x86_64                                  2/5
 Verifying : icedtea-web-1.7.1-1.el7.x86_64                                       3/5
 Verifying : rhino-1.7R5-1.el7.noarch                                        4/5
 Verifying : jline-1.0-8.el7.noarch                                         5/5
 
Removed:
 java-1.8.0-openjdk.x86_64 1:1.8.0.222.b03-1.el7             java-1.8.0-openjdk-headless.x86_64 1:1.8.0.222.b03-1.el7            
 
Dependency Removed:
 icedtea-web.x86_64 0:1.7.1-1.el7          jline.noarch 0:1.0-8.el7          rhino.noarch 0:1.7R5-1.el7          
 
Complete!

上傳安裝介質并解壓

[hadoop@master ~]$ sudo tar -xzf jdk-8u191-linux-x64.tar.gz -C /usr/lib/jvm

設置環境變量,在/etc/profile最前面加上

export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_191
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

最后生效一下source /etc/profile

感謝你能夠認真閱讀完這篇文章,希望小編分享卸載linux自帶openjdk并安裝sun jdk的方法內容對大家有幫助,同時也希望大家多多支持億速云,關注億速云行業資訊頻道,遇到問題就找億速云,詳細的解決方法等著你來學習!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

防城港市| 积石山| 镇远县| 潢川县| 团风县| 富顺县| 新乡市| 屏山县| 仁布县| 万年县| 鄂托克前旗| 浦北县| 潍坊市| 福鼎市| 孝昌县| 鄯善县| 青田县| 奇台县| 汝阳县| 梁河县| 武功县| 黔西县| 阿瓦提县| 呼伦贝尔市| 会宁县| 休宁县| 浦县| 峨山| 丹巴县| 广饶县| 全椒县| 奉贤区| 闻喜县| 屏山县| 资溪县| 二手房| 个旧市| 都昌县| 包头市| 双流县| 衡水市|