参见:https://www.jb51.net/article/112612.htm
检查一下系统中的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
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“如何卸载linux自带openjdk并安装sun jdk”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新动态
2024年11月23日
2024年11月23日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]