码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-06-03 21:35:29      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:centos   安装   jdk   maven   subversion   

/**
 * @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用户密码
 * @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                             #重复验证(普通用户重连服务器后才会生效)
 * @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>
 */

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

标签:centos   安装   jdk   maven   subversion   

原文地址:http://blog.csdn.net/jadyer/article/details/46350825

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!