• centos服务器搭建-jdk-8u112


    OpenJDK卸载java jdk

    [root@localhost ~]# java -version

    openjdk version "1.8.0_65"

    OpenJDK RuntimeEnvironment (build 1.8.0_65-b17)

    OpenJDK 64-Bit ServerVM (build 25.65-b01, mixed mode)

    [root@localhost ~]# rpm  -qa | grep java

    javapackages-tools-3.4.1-11.el7.noarch

    java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

    tzdata-java-2015g-1.el7.noarch

    python-javapackages-3.4.1-11.el7.noarch

    java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64

    [root@localhost ~]# rpm -qa | grep jdk

    java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

    java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64

     

    rpm-e icedtea-web-1.6.1-4.el7.x86_64

    rpm-e java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64

    rpm-e java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

    rpm-qa | grep java | xargs rpm -e --nodeps

     

    JDK官方下载地址:        http://www.oracle.com/technetwork/java/javase/downloads/index.html

    cd   /home/

    wget     http://mirrors.linuxeye.com/jdk/jdk-8u112-linux-x64.tar.gz

    tar   -xvf    jdk-8u112-linux-x64.tar.gz    -C   /usr/local/

    ln   -s  /usr/local/jdk1.8.0_112/       /usr/local/jdk

    vim  /etc/profile

    #/etc/profile

    # Systemwide environment and startup programs, for login setup

    # Functionsand aliases go in /etc/bashrc

    export   JAVA_HOME=/usr/local/jdk

    export   JRE_HOME=/usr/local/jdk/jre

    export  CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH

    export PATH=$PATH:/usr/local/mysql/bin:/usr/local/nginx/sbin:$JAVA_HOME/bin

    方法2.

    #vi  /etc/profile.d/java.sh

    java.sh 内容

    1.方式

    JAVA_HOME=/usr/local/jdk

    PATH=$JAVA_HOME/bin:$PATH

    export JAVA_HOME PATH

    2.方式

    export JAVA_HOME=/usr/local/jdk

    export CLASSPATH=$JAVA_HOME/lib/   

    export PATH=$PATH:$JAVA_HOME/bin  

    source  /etc/profile

    java-version

    echo  $JAVA_HOME

    echo$CLASSPATH

    echo$PATH

  • 相关阅读:
    操作缓冲池
    占位图像
    GCD 常用代码
    资源共享(抢夺)
    drf版本控制 django缓存
    drf分页器
    解析器,路由控制,响应器
    drf 频率组件 META字典详情
    vue创建路由,axios前后台交互,element-ui配置使用,django contentType组件
    redis列表,字典,管道,vue安装,创建项目
  • 原文地址:https://www.cnblogs.com/ncepu/p/13695098.html
Copyright © 2020-2023  润新知