报错
#tar -xvf jdk-8u131-linux-x64.tar.gz,执行命令后报错如下:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
完美解决
在wget后添加一下
--no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
命令如下:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" “你需要下载的东西”
[root@zuitu source]# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
Java8 信息输出
[root@zuitu script]# tail -n 5 /etc/profile #环境变量设置
#Java Env
export JAVA_HOME=/server/source/jdk1.8.0_191
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
[root@zuitu script]# java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
[root@zuitu script]#
更多的博客转移到个人博客上了,请点击以下链接:
个人博客
转载于:https://blog.51cto.com/leoheng/2342255