• CentOS-6.4-minimal版中安装JDK_Maven_Subversion以及改动rpm包安装路径


    完整版见https://jadyer.github.io/2013/09/07/centos-config-develop/




    /**
     * @see -------------------------------------------------------------------------------------------------
     * @see 安装JDK
     * @see [root@CentOS64 ~]# cd /
     * @see [root@CentOS64 /]# mkdir app
     * @see [root@CentOS64 ~]# groupadd Develop                            #加入Develop组
     * @see [root@CentOS64 ~]# useradd -g Develop Jadyer                   #创建Jadyer用户并将其分配到Develop组
     * @see [root@CentOS64 ~]# passwd Jadyer                               #设置或改动Jadyer用户password
     * @see [root@CentOS64 /]# chown -R Jadyer:Develop /app                #将/app文件夹的拥有者改动为Jadyer用户和Develop组
     * @see [Jadyer@CentOS64 software]$ tar zxvf jdk-8u40-linux-x64.tar.gz #解压jdk
     * @see [Jadyer@CentOS64 software]$ mv jdk1.8.0_40/ /app/jdk1.8.0_40   #统一存放应用在/app文件夹中
     * @see [root@CentOS64 ~]# vi /etc/profile                             #配置环境变量,最后[:x]保存就可以
     * @see                       #Set Java Environment Variable
     * @see                       JAVA_HOME=/app/jdk1.8.0_40
     * @see                       PATH=$PATH:$JAVA_HOME/bin
     * @see                       export JAVA_HOME PATH
     * @see [root@CentOS64 ~]# echo $PATH                                  #查看当前PATH
     * @see [root@CentOS64 ~]# source /etc/profile                         #令环境变量生效
     * @see [root@CentOS64 ~]# echo $PATH                                  #再看下PATH
     * @see [root@CentOS64 ~]# java -version                               #验证是否成功
     * @see [Jadyer@CentOS64 ~]$ java -version                             #反复验证(普通用户重连server后才会生效)
     * @see -------------------------------------------------------------------------------------------------
     * @see 安装Maven
     * @see [Jadyer@localhost ~]$ cd /app/
     * @see [Jadyer@localhost app]$ tar -zxvf apache-maven-3.2.5-bin.tar.gz
     * @see [Jadyer@localhost app]$ rm -rf apache-maven-3.2.5-bin.tar.gz
     * @see [root@localhost Jadyer]# vi /etc/profile
     * @see                          #Set Maven Environment Variable
     * @see                          MAVEN_HOME=/app/apache-maven-3.2.5
     * @see                          PATH=$PATH:$MAVEN_HOME/bin
     * @see                          export MAVEN_HOME PATH
     * @see [root@localhost Jadyer]# source /etc/profile
     * @see [root@localhost Jadyer]# echo $PATH
     * @see [root@localhost Jadyer]# mvn -version
     * @see [Jadyer@localhost ~]$ mvn -version
     * @see [Jadyer@localhost ~]$ cd /app/code/
     * @see [Jadyer@localhost code]$ mkdir MavenRepository
     * @see [Jadyer@localhost code]$ vi /app/apache-maven-3.2.5/conf/settings.xml
     * @see                          <localRepository>/app/code/MavenRepository</localRepository>
     * @see [Jadyer@localhost code]$ cp /app/apache-maven-3.2.5/conf/settings.xml MavenRepository/
     * @see -------------------------------------------------------------------------------------------------
     * @see 安装Subversion
     * @see https://www.open.collab.net/files/documents/60/11125/CollabNetSubversion-client-1.8.13-1.x86_64.rpm
     * @see [Jadyer@localhost ~]$ rpm -q Subversion
     * @see [Jadyer@localhost ~]$ rpm -ivh /app/CollabNetSubversion-client-1.8.13-1.x86_64.rpm
     * @see warning: /app/CollabNetSubversion-client-1.8.13-1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 35bcca43: NOKEY
     * @see Preparing...                ########################################### [100%]
     * @see    1:CollabNetSubversion-cli########################################### [100%]
     * @see [root@localhost Jadyer]# svn --version
     * @see [root@localhost Jadyer]# vi /etc/profile
     * @see                          #Set Subversion Environment Variable
     * @see                          SVN_HOME=/opt/CollabNet_Subversion
     * @see                          PATH=$PATH:$SVN_HOME/bin
     * @see                          export SVN_HOME PATH
     * @see [root@localhost Jadyer]# source /etc/profile
     * @see [root@localhost Jadyer]# svn --version
     * @see [Jadyer@localhost ~]$ svn --version
     * @see -------------------------------------------------------------------------------------------------
     * @create 2015-5-27 下午3:19:19
     * @author 玄玉<http://blog.csdn.net/jadyer>
     */
    /**
     * @see -------------------------------------------------------------------------------------------------
     * @see 关于rpm的安装路径
     * @see rpm包通常都有默认的安装路径,但也有办法更新它的默认安装路径,仅仅只是不是全部的rpm都同意安装到其他路径
     * @see 以下以CollabNetSubversion-client-1.8.13-1.x86_64.rpm和jdk-6u45-linux-amd64.rpm为例
     * @see -------------------------------------------------------------------------------------------------
     * @see [Jadyer@localhost app]$ rpm -qpi CollabNetSubversion-client-1.8.13-1.x86_64.rpm
     * @see warning: CollabNetSubversion-client-1.8.13-1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 35bcca43: NOKEY
     * @see Name        : CollabNetSubversion-client   Relocations: (not relocatable)
     * @see Version     : 1.8.13                            Vendor: CollabNet
     * @see Release     : 1                             Build Date: Mon 23 Mar 2015 02:49:36 AM EDT
     * @see Install Date: (not installed)               Build Host: cu128.cloud.maa.collab.net
     * @see Group       : Utilities/System              Source RPM: CollabNetSubversion-client-1.8.13-1.src.rpm
     * @see Size        : 39281894                         License: Proprietary
     * @see Signature   : DSA/SHA1, Mon 23 Mar 2015 02:49:51 AM EDT, Key ID 80233a5a35bcca43
     * @see Packager    : Alexander Thomas (AT) <alexander@collab.net>
     * @see URL         : http://open.collab.net
     * @see Summary     : A Concurrent Versioning system similar to but better than CVS.
     * @see Description :
     * @see CollabNet Subversion client is a free download of open-source Subversion,
     * @see compiled and tested by CollabNet. For more information about CollabNet
     * @see Subversion, visit the CollabNet community at http://open.collab.net.
     * @see -------------------------------------------------------------------------------------------------
     * @see [Jadyer@localhost app]$ rpm -qpi jdk-6u45-linux-amd64.rpm
     * @see Name        : jdk                          Relocations: /usr/java 
     * @see Version     : 1.6.0_45                          Vendor: Oracle and/or its affiliates.
     * @see Release     : fcs                           Build Date: Tue 26 Mar 2013 07:54:12 PM EDT
     * @see Install Date: (not installed)               Build Host: jb6-lin-amd64.sfbay.sun.com
     * @see Group       : Development/Tools             Source RPM: jdk-1.6.0_45-fcs.src.rpm
     * @see Size        : 127250396                        License: Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. Also under other license(s) as shown at the Description field.
     * @see Signature   : (none)
     * @see Packager    : Java Software <jre-comments@java.sun.com>
     * @see URL         : http://www.oracle.com/technetwork/java/javase/overview/index.html
     * @see Summary     : Java(TM) Platform Standard Edition Development Kit
     * @see Description :
     * @see The Java Platform Standard Edition Development Kit (JDK) includes both
     * @see the runtime environment (Java virtual machine, the Java platform classes
     * @see and supporting files) and development tools (compilers, debuggers,
     * @see tool libraries and other tools).
     * @see 
     * @see The JDK is a development environment for building applications, applets
     * @see and components that can be deployed with the Java Platform Standard
     * @see Edition Runtime Environment.
     * @see -------------------------------------------------------------------------------------------------
     * @see 通过二者的Relocations參数,我们能够看到Subversion是不同意重定位的,而jdk则同意
     * @see 所以,Subversion仅仅能安装在默认路径下,而jdk则能够改动其默认安装路径/usr/java为其他路径,方法例如以下
     * @see [Jadyer@localhost app]$ rpm -ivh --badreloc --relocate /usr/java=/app/jdk1.6.0_45 jdk-6u45-linux-amd64.rpm
     * @see badreloc是将文件强制安装到指定位置
     * @see relocate是将文件从oldpath安装到newpath
     * @see -------------------------------------------------------------------------------------------------
     * @create 2015-5-27 下午7:08:43
     * @author 玄玉<http://blog.csdn.net/jadyer>
     */
  • 相关阅读:
    ssh中使用spring的集成quartz 编写定时任务
    ssh只读事务的管理
    ssh2的application.xml配置文件配置详解
    spring中使用 @value 简化配置文件的读取
    【转】Spring Annotation 详解
    ssh之<context:component-scan base-package="com.xx" />
    ssh2学习-applicationContext.xml文件配置-----<context:annotation-config/>详解
    【转】线程同步------java synchronized详解
    java web程序中项目名的更改(http://localhost:8080/)后面的名字
    mysql 5.6 修改root原始密码不为空方法
  • 原文地址:https://www.cnblogs.com/zhchoutai/p/7066054.html
Copyright © 2020-2023  润新知