centos6.x上安装Java-1.8.0

author : headsen chen

date : 2017-12-04  10:32:44

notice :This  article is created by headsen chen himself and not allowed to copy.or you will be  treated on law

question:

centos6上自带的是Java.1.7,已经源码包安装了Java-1.8.0_66,但是系统默认的还是Java 1.7.0,启动不了elasticsearch

centos6.x上安装Java-1.8.0

centos6.x上安装Java-1.8.0

answer:

先卸载自带的Java,然后再重新安装Java (不卸载的话,提示Java1.7.0就是最新版)

yum -y remove java  (不要卸载源码包安装的Java.1.8.0)

yum -y install java   (此时安装的就是1.8.0)

centos6.x上安装Java-1.8.0

下面再次启动elasticsearch 就能成功启动了

centos6.x上安装Java-1.8.0

但此时通过查看的还是源码包安装的Java版本,但不影响使用

centos6.x上安装Java-1.8.0

上一篇:setinIerval和setTimeout的区别?


下一篇:php面试题目