简介:Linux云服务器安装JDK1.8
1、官方地址:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2、使用wget 下载或者本地上传
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" 复制下载地址
示例:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz
3、配置全局环境变量
解压:tar -zxvf jdk-8u171-linux-x64.tar.gz
vim /etc/profile
配置
#set java environment
JAVA_HOME=/usr/local/java/jdk1.8.0_171
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin
export PATH JAVA_HOME CLASSPATH
4、环境变量立刻生效
source /etc/profile
5、查看安装情况
java -version
6、linux图形操作工具
mac: filezilla
windows: winscp
资料:https://jingyan.baidu.com/article/ed2a5d1f346fd409f6be179a.html