• kali/centos 更新 java


    kali 转自:http://blog.sina.com.cn/s/blog_5736d8870102w15u.html
    墙内的论坛上和博客上有很多这样的文章了,不过一般过程都很复杂,让人看的头晕眼花,搬运过来一个比较简单的,更新java的目的单纯动机简单,就是为了用各种外壳程序,kali自带的版本有点低,至少要1.7x才好用,废话不多说了,下载
    http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75-linux-x64.tar.gz?AuthParam=1427359148_ae68f5f1ce807daf5db988014b347e97  
    然后解压
    tar zxvf  jdk-7u75-linux-x64.tar.gz
    第二步,转移:
    mv jdk1.7.0_75/ /opt/
    cd /opt/jdk1.7.0_75/
    第三步,安装
    update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_75/bin/java 1
    update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_75/bin/javac 1
    update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_75/jre/lib/amd64/libnpjp2.so 1
    update-alternatives --set java /opt/jdk1.7.0_75/bin/java
    update-alternatives --set javac /opt/jdk1.7.0_75/bin/javac
    运行一下看看:
     java -version
    java version "1.7.0_75"
    Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
    简单易用,分分钟配置好

    centos:

    [root@localhost 桌面]# yum list java*
    已加载插件:fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
     * base: centos.ustc.edu.cn
     * extras: centos.ustc.edu.cn
     * updates: centos.ustc.edu.cn
    已安装的软件包
    java-1.7.0-openjdk.x86_64                                                  1:1.7.0.75-2.5.4.2.el7_0                                @anaconda
    java-1.7.0-openjdk-headless.x86_64                                         1:1.7.0.75-2.5.4.2.el7_0                                @anaconda
    java-1.8.0-openjdk-debug.x86_64                                            1:1.8.0.111-1.b15.el7_2                                 @updates 
    java-1.8.0-openjdk-devel-debug.x86_64                                      1:1.8.0.111-1.b15.el7_2                                 @updates 
    java-1.8.0-openjdk-headless-debug.x86_64                                   1:1.8.0.111-1.b15.el7_2                                 @updates 
    javapackages-tools.noarch                                                  3.4.1-6.el7_0                                           @anaconda
    可安装的软件包
    java-1.6.0-openjdk.x86_64                                                  1:1.6.0.40-1.13.12.5.el7_2                              updates  
    java-1.6.0-openjdk-demo.x86_64                                             1:1.6.0.40-1.13.12.5.el7_2                              updates  
    java-1.6.0-openjdk-devel.x86_64                                            1:1.6.0.40-1.13.12.5.el7_2                              updates  
    java-1.6.0-openjdk-javadoc.x86_64                                          1:1.6.0.40-1.13.12.5.el7_2                              updates  
    java-1.6.0-openjdk-src.x86_64                                              1:1.6.0.40-1.13.12.5.el7_2                              updates  
    java-1.7.0-openjdk.x86_64                                                  1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.7.0-openjdk-accessibility.x86_64                                    1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.7.0-openjdk-demo.x86_64                                             1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.7.0-openjdk-devel.x86_64                                            1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.7.0-openjdk-headless.x86_64                                         1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.7.0-openjdk-javadoc.noarch                                          1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.7.0-openjdk-src.x86_64                                              1:1.7.0.111-2.6.7.2.el7_2                               updates  
    java-1.8.0-openjdk.x86_64                                                  1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-accessibility.x86_64                                    1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-accessibility-debug.x86_64                              1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-demo.x86_64                                             1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-demo-debug.x86_64                                       1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-devel.x86_64                                            1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-headless.x86_64                                         1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-javadoc.noarch                                          1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-javadoc-debug.noarch                                    1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-src.x86_64                                              1:1.8.0.111-1.b15.el7_2                                 updates  
    java-1.8.0-openjdk-src-debug.x86_64                                        1:1.8.0.111-1.b15.el7_2                                 updates  
    java-atk-wrapper.i686                                                      0.30.4-5.el7                                            base     
    java-atk-wrapper.x86_64                                                    0.30.4-5.el7                                            base     
    java_cup.noarch                                                            1:0.11a-16.el7                                          base     
    java_cup-javadoc.noarch                                                    1:0.11a-16.el7                                          base     
    java_cup-manual.noarch                                                     1:0.11a-16.el7                                          base     
    javacc.noarch                                                              5.0-10.el7                                              base     
    javacc-demo.noarch                                                         5.0-10.el7                                              base     
    javacc-javadoc.noarch                                                      5.0-10.el7                                              base     
    javacc-manual.noarch                                                       5.0-10.el7                                              base     
    javacc-maven-plugin.noarch                                                 2.6-17.el7                                              base     
    javacc-maven-plugin-javadoc.noarch                                         2.6-17.el7                                              base     
    javamail.noarch                                                            1.4.6-8.el7                                             base     
    javamail-javadoc.noarch                                                    1.4.6-8.el7                                             base     
    javapackages-tools.noarch                                                  3.4.1-11.el7                                            base     
    javassist.noarch                                                           3.16.1-10.el7                                           base     
    javassist-javadoc.noarch                                                   3.16.1-10.el7                                           base 
    [root@localhost 桌面]# yum install java-1.8.0-openjdk.x86_64
    ...
    等待升级完毕
  • 相关阅读:
    查询sqlserver 表结构呀
    每日笔记---使用@ConfigurationProperties读取yml配置
    注解@Slf4j
    maven 环境变量 设置
    maven settings 设置
    如何配置Java环境变量
    SSH通过SSH代理连接到内网机器
    解决jenkins slave 中文乱码 encoding=ANSI_X3.4-1968
    netcore 获取本地网络IP地址
    centos7安装libgdiplus。netcore生成验证码,处理图片
  • 原文地址:https://www.cnblogs.com/zheh/p/6003313.html
Copyright © 2020-2023  润新知