Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ rpm package specify the installation path     - Linux Getting Started Tutorial: How to set up a static MAC address on VMware ESXi virtual machine (Mobile)

- Linux FTP setting file description (Server)

- Teach you how to protect the security of Linux desktop (Linux)

- Use innobackupex full realization of MySQL hot backup (Database)

- Upload the project to GitHub, synchronous remote repository Github (Linux)

- To set up the printer use Nagios Monitoring Server (Server)

- How to use awk command in Linux (Linux)

- Ubuntu Learning Advanced article - to teach you to further enhance system security (Linux)

- Puppet subcommands Introduction (Server)

- Ubuntu 14.04 installed NVIDIA graphics driver (Linux)

- Linux System Getting Started Learning: the local time in between Perl and UNIX timestamp conversion (Linux)

- C # socket udp broadcast (Programming)

- MongoDB simple replication configuration (Database)

- Use HttpClient remote interface testing (Programming)

- Physical backup and recovery SYSTEM table space (Database)

- Seven kinds of NIC binding mode Detail (Linux)

- Linux into single user mode to modify the administrator password (Linux)

- Python script file directory traversal examples (Programming)

- shell script: MySQL startup script simple (Database)

- Create the container and run the application Docker (Server)

 
         
  rpm package specify the installation path
     
  Add Date : 2018-11-21      
         
       
         
  Rpm package generally have a default installation path, how do you want to change the default path, there is no way out? Of course. Consider the following example.
For example, the installation JDK (Java Development Kit) or JRE (Java Runtime Environment) when the default installation path RedHat package file is / usr / java. If you want to install in other paths, for example, to put / home / java directory to, how?
A first view package details rpm
[Root @ Oracle ~] # rpm -qpi jdk-6u43-linux-amd64.rpm
Name: jdk Relocations: / usr / java
Version: 1.6.0_43 Vendor: Oracle and / or its affiliates.
Release: fcs Build Date: Fri 01 Mar 2013 09:03:27 PM CST
Install Date: (not installed) Build Host: jb6-lin-amd64.sfbay.sun.com
Group: Development / Tools Source RPM: jdk-1.6.0_43-fcs.src.rpm
Size: 127075557 License:.. Copyright (c) 2011, Oracle and / or its affiliates All rights reserved Also under other license (s) as shown at the Description field.
Signature: (none)
Packager: Java Software
URL: http://www.oracle.com/technetwork/java/javase/overview/index.html
Summary: Java (TM) Platform Standard Edition Development Kit
Description:
The Java Platform Standard Edition Development Kit (JDK) includes both
the runtime environment (Java virtual machine, the Java platform classes
and supporting files) and development tools (compilers, debuggers,
tool libraries and other tools).

The JDK is a development environment for building applications, applets
and components that can be deployed with the Java Platform Standard
Edition Runtime Environment.

This is the default JDK to be installed in the / usr / java under.

Below us to set the parameters, you can install the JDK in the directory you specify.
[Root @ linuxidc ~] # rpm -i --badreloc --relocate / usr / java = / home / java jdk-6u43-linux-amd64.rpm
Unpacking JAR files ...
        rt.jar ...
        jsse.jar ...
        charsets.jar ...
        tools.jar ...
        localedata.jar ...
        plugin.jar ...
        javaws.jar ...
        deploy.jar ...
ln: creating symbolic link `/usr/java/jdk1.6.0_43 ': No such file or directory
Interpretation of parameters:
badreloc is mandatory to install the files to the place you want.
relocate is only to be attached to the file under the installation oldpath to newpath, implementation will install some files to another path, rather than all of the package files are replaced.
But either prefix or relocate are not necessarily can really be used, or the file is not allowed because some packages installed to a different path, such as oracleasm-support-2.1.8-1.el6.x86_64.rpm

[Root @ oracle ~] # rpm -qpi oracleasm-support-2.1.8-1.el6.x86_64.rpm
warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA / SHA256 Signature, key ID ec551f03: NOKEY
Name: oracleasm-support Relocations: (not relocatable)
Version: 2.1.8 Vendor: Oracle Corporation
Release: 1.el6 Build Date: Sat 09 Feb 2013 06:46:49 AM CST
Install Date: (not installed) Build Host: ca-build44.us.oracle.com
Group: System Environment / Kernel Source RPM: oracleasm-support-2.1.8-1.el6.src.rpm
Size: 221696 License: GPL
Signature: RSA / 8, Sat 09 Feb 2013 06:50:30 AM CST, Key ID 72f97b74ec551f03
Packager: Joel Becker
URL: http://oss.oracle.com/projects/oracleasm/
Summary: The Oracle Automatic Storage Management support programs.
Description:
Tools to manage the Oracle Automatic Storage Management library driver

not relocatable relocation is not, you can not modify the installation directory, only remove the --prefix parameter.

[Root @ linuxidc ~] # java -version
-bash: / usr / bin / java: No such file or directory
JAVA version does not show this time, because the environment variable is not modified.
Modify environment variables below JAVA
[Root @ linuxidc jdk1.6.0_43] # vi / etc / profile
JAVA_HOME = / home / java / jdk1.6.0_43
PATH = $ JAVA_HOME / bin: $ PATH
CLASSPATH =:. $ JAVA_HOME / lib / dt.jar: $ JAVA_HOME / lib / tools.jar
export JAVA_HOME
export PATH
export CLASSPATH
"/ Etc / profile" 85L, 1961C written

[Root @ linuxidc jdk1.6.0_43] # source / etc / profile
The environment variables to take effect.
Then view, there is a JAVA version number is displayed.
[Root @ linuxidc jdk1.6.0_43] # java -version
java version "1.6.0_43"
Java (TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot (TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

Add:
When you install JDK, need to look at whether there are other original system JAVA version number, if you want to install is inconsistent with, uninstall then install.
[Root @ linuxidc ~] # java -version
java version "1.7.0_45"
OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64 u45-b15)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)
To find
[Root @ linuxidc ~] # rpm -aq | grep java
java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
tzdata-java-2013g-1.el6.noarch
java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
Forced Uninstall
[Root @ linuxidc ~] # rpm -e --nodeps java-1.7.0-openjdk-1.7.0.45-2.4.3.3.el6.x86_64
[Root @ linuxidc ~] # rpm -aq | grep java
tzdata-java-2013g-1.el6.noarch
java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
[Root @ linuxidc ~] # rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.66.1.13.0.el6.x86_64
Re-examination, found to have a clean uninstall.
[Root @ linuxidc ~] # java -version
-bash: / usr / bin / java: No such file or directory
     
         
       
         
  More:      
 
- Linux Log Clear (Linux)
- Difference Docker mirror and containers (Server)
- Linux System Tutorial: Ubuntu on the desktop is disabled by default keyring to unlock tips (Linux)
- Linux ldconfig command (Linux)
- The Linux OOM Terminator (Server)
- Linux GCC 5.1.0 compiler installation (Linux)
- Java multi-threaded communications pipeline flow (Programming)
- Fatal NI connect error 12170 error in Alert Log (Database)
- 10 important Linux ps command combat (Linux)
- AppCode developed Mac OS X application or shared library experience summary (Programming)
- To install Redis under Linux (Database)
- Linux Getting Started tutorial: GNU C and Vim will fight the C / C ++ IDE semi-automatic (Linux)
- Ubuntu 12.04 64-bit installation Redmine + Git + ReviewBoard (Linux)
- Zabbix Agent (Server)
- Nodejs mysql pool Example (Programming)
- How to configure SNMPv3 on Ubuntu, CentOS and Cisco systems (Linux)
- CentOS 7.1 install NTFS-3G (Linux)
- LinkedList Basic Usage (Programming)
- How to run Kali Linux 2.0 in Docker container (Linux)
- Vagrant Getting Start (Linux)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.