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

/**
 * @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

CentOS-6.4-minimal版中安装JDK_Maven_Subversion以及修改rpm包安装路径的相关文章

src.rpm包安装方法

有些软件包是以.src.rpm结尾的,这类软件包是包含了源代码的rpm包,在安装时需要进行编译.这类软件包有多种安装方法,以redhat为例说明如下: 注意: 如果没有rpmbuild可以从系统安装光盘的Package中找到 rpm-build-version-packTimes.os.arch.rpm包安装 rpm -ivh rpm-build-version-packTimes.os.arch.rpm 方法一: 1. 执行rpm -i your-package.src.rpm 2. cd /

CentOS使用yum源中自带的rpm包安装LAMP环境

CentOS使用yum源中自带的rpm包安装LAMP环境.这是Linux下安装LAMP的环境一种最基本最简便的方式.新手可以从容安装使用. 1. 安装基础包(可选安装)yum install -y wget zip unzip gzipyum install -y python ruby perlyum install -y gc gcc gcc-c++ 2. 安装php及其相关组件yum install -y php php-gdyum install -y php-mbstring php-

rpm包安装过程中依赖问题“libc.so.6 is needed by XXX”解决方法

rpm包安装过程中依赖问题"libc.so.6 is needed by XXX"解决方法 折腾了几天,终于搞定了CentOS上的Canon LBP2900打印机驱动.中间遇到了一些问题,主要是安装rpm包出现的依赖问题,费尽周折总算是解决了.现在简单总结一下. 首先说明一下,我用的CentOS版本是6.6,64位.打印机驱动程序是两个rpm安装包:cndrvcups-common-2.60-1.x86_64.rpm和cndrvcups-capt-2.60-1.x86_64.rpm.

【MongDB运维】MongDB自动安装脚本--rpm包安装版

#!/bin/bash # Version:  v1.0 by Jason_Asia on 2014-05-14 # Desc:     auto install mongodb rpm packages software_dir=/home/dba/software/mongodb ##{{{ check mongodb install status mongod_thread_status="`netstat -nltp | grep mongod | wc -l`" if [ $

rpm包安装

RPM全称是"RedHatPackageManager"是由RedHat公司发发展起来的,本质是将软件源码包经过编译并且打包成rpm的格式,rpm文件包含的有二进制文件,配置文件,库文件等,同时RPM以一种数据库记录的方式将所需要的软件安装到linux系统上,优点是安装方便,缺点是只能安装在编译时默认的硬件与操作系统版本.1.rpm包的版本说明httpd-2.2.3-74.el5.centos.i386.rpm#以此软件为例说明httpd :软件名2.2.3 :分别表示:主版本号-次版

RPM包安装LAMP及httpd虚拟机SSL实现

简单罗列基础命令,只分享我的想法! 目的:通过RPM包安装LAMP,提供两个虚拟主机,一个用于WordPress,一个用于phpMyAdmin,为后一个提供ssl访问方式. 环境是vmware的虚拟机CentOS6.6,实机win7,后面的测试会用到win7上面的浏览器,已经把虚拟机中CentOS中的两个httpd的虚拟机的名字加入到win7的hosts文件中. 1.  修改yum源,指向CentOS的系统光盘,需要使用RPM包,配置如下: 图1 2.  安装apache的httpd,直接yum

漫漫运维路——基于rpm包安装实现LAMP

LAMP早期即为Linux+Apache+MySQL+PHP,以基于Linux平台的三个软件搭建出动态网页站点,而现在的LAMP不仅仅代表以上几个软件,因为现在的开源软件种类较多,网站的构建人员的选择也较多,所以现在的M可以为MySQL,也可以为maria DB或者是其他的数据库管理系统.而P则也不仅可代表PHP,在实际应用中还可能是Python.Perl.JSP等语言. 本文将基于rpm包安装的形式实现Linux+Apache+MySQL+PHP的LAMP平台,并且实现以下功能: 1.创建两个

Python学习第六天----Linux内存管理、进程管理、RPM包安装管理及源码安装软件

Linux内存管理.进程管理.RPM包安装管理及源码安装软件 一.交换分区     交换分区其实就相当于Windows系统下的虚拟内存的概念,当物理内存不够用的时候,由操作系统将硬盘的一块区域划分出来作为内存使用.具体使用方法如下:      [[email protected] ~]# fdisk -l 磁盘 /dev/sdb:16.1 GB, 16106127360 字节,31457280 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):5

linux rpm包 安装 升级 卸载 查询

RPM是 "Redhat Package Manager" 的缩写,根据名字也能猜到这是Redhat公司开发出来的.RPM 是以一种数据库记录的方式来将您所需要的套件安装到您的Linux 主机的一套管理程序.也就是说,您的linux系统中存在着一个关于RPM的数据库,它记录了安装的包以及包与包之间依赖相关性.RPM包是预先在linux机器上编译好并打包好的文件,安装起来非常快捷.但是也有一些缺点,比如安装的环境必须与编译时的环境一致或者相当:包与包之间存在着相互依赖的情况:卸载包时需要