• JDK安装


    tar xf jdk-8u11-linux-x64.tar.gz 
    
    mv jdk1.8.0_11 /usr/local/jdk
    
    vim /etc/profile
    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:$JRE_HOME/lib export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

    . /etc/profile

    [root@localhost jdk]# java -version
    java version "1.8.0_11"
    Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

    Saltstack:

    jdk-install:
      file.managed:
        - name: /usr/local/jdk-8u11-linux-x64.tar.gz
        - source: salt://jdk/files/jdk-8u11-linux-x64.tar.gz
        - user: root
        - group: root
        - mode: 644
      cmd.run:
        - name: cd /usr/local/ && tar xf jdk-8u11-linux-x64.tar.gz && mv jdk1.8.0_11 jdk
        - unless: test -d /usr/local/jdk
        - require:
          - file: jdk-install
    
    /etc/profile:
      file.append:
        - text:
          - 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:$JRE_HOME/lib
          - export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
      cmd.run:
        - name: source /etc/profile && cd /usr/local && rm -rf jdk-8u11-linux-x64.tar.gz
  • 相关阅读:
    线段树优化建图 && CF-786B.Legacy(优化建图,dijkstra)
    构建高性能JavaScript应用
    关于互联网应用前端架构的一些思考
    Router模块
    View模块
    Backbone源码解析系列
    Model模块
    Events模块
    Backbone源码风格
    jQuery选择器总结
  • 原文地址:https://www.cnblogs.com/Template/p/9318644.html
Copyright © 2020-2023  润新知