/** * @see ------------------------------------------------------------------------------------------------- * @see 安装JDK * @see [[email protected] ~]# cd / * @see [[email protected] /]# mkdir app * @see [[email protected] ~]# groupadd Develop #添加Develop组 * @see [[email protected] ~]# useradd -g Develop Jadyer #创建Jadyer用户并将其分配到Develop组 * @see [[email protected] ~]# passwd Jadyer #设置或修改Jadyer用户密码 * @see [[email protected] /]# chown -R Jadyer:Develop /app #将/app目录的拥有者修改为Jadyer用户和Develop组 * @see [[email protected] software]$ tar zxvf jdk-8u40-linux-x64.tar.gz #解压jdk * @see [[email protected] software]$ mv jdk1.8.0_40/ /app/jdk1.8.0_40 #统一存放应用在/app目录中 * @see [[email protected] ~]# 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 [[email protected] ~]# echo $PATH #查看当前PATH * @see [[email protected] ~]# source /etc/profile #令环境变量生效 * @see [[email protected] ~]# echo $PATH #再看下PATH * @see [[email protected] ~]# java -version #验证是否成功 * @see [[email protected] ~]$ java -version #重复验证(普通用户重连服务器后才会生效) * @see ------------------------------------------------------------------------------------------------- * @see 安装Maven * @see [[email protected] ~]$ cd /app/ * @see [[email protected] app]$ tar -zxvf apache-maven-3.2.5-bin.tar.gz * @see [[email protected] app]$ rm -rf apache-maven-3.2.5-bin.tar.gz * @see [[email protected] 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 [[email protected] Jadyer]# source /etc/profile * @see [[email protected] Jadyer]# echo $PATH * @see [[email protected] Jadyer]# mvn -version * @see [[email protected] ~]$ mvn -version * @see [[email protected] ~]$ cd /app/code/ * @see [[email protected] code]$ mkdir MavenRepository * @see [[email protected] code]$ vi /app/apache-maven-3.2.5/conf/settings.xml * @see <localRepository>/app/code/MavenRepository</localRepository> * @see [[email protected] 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 [[email protected] ~]$ rpm -q Subversion * @see [[email protected] ~]$ 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 [[email protected] Jadyer]# svn --version * @see [[email protected] 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 [[email protected] Jadyer]# source /etc/profile * @see [[email protected] Jadyer]# svn --version * @see [[email protected] ~]$ 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 [[email protected] 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) <[email protected]> * @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 [[email protected] 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 <[email protected]> * @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 [[email protected] 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> */
时间: 2024-10-06 14:47:20