Linux下安装JDK

RPM方式安装JDK

查看安装的jdk
rpm -qa|grep jdk
下载jdk

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

安装JDK
rpm -ivh jdk-8uversion-linux-x64.rpm
查看jdk安装在哪里
rpm -qpl  jdk-8uversion-linux-x64.rpm
修改/etc/profile文件
vim /etc/profile

加入下面两行

export JAVA_HOME=/usr/java/jdk1.8.0_181-amd64
export PATH=$JAVA_HOME/bin:$PATH
posted @ 2019-06-29 08:46  梦见舟  阅读(167)  评论(0编辑  收藏  举报