Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view and change the default installation path for rpm

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article focuses on "how to view and change the default installation path of rpm". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to view and change the default installation path of rpm.

Most people install the RPM package using the following command:

The code is as follows:

Rpm-ivh xxxx.rpm

This is the easiest way to install, and the files in the RPM package will be installed in the default directory specified at the time of packaging.

But there are times when we can't write to the root directory without the system's root permission, or for some reason (such as during file recovery) we want to change the default installation path of RPM. The following tips can be used at this time.

First check the default installation directory for the RPM package with the following command, for example:

The code is as follows:

Easwy:~$ rpm-qpl ext3grep-0.10.0-1.el5.rf.i386.rpm

/ usr/bin/ext3grep

/ usr/share/doc/ext3grep-0.10.0

/ usr/share/doc/ext3grep-0.10.0/INSTALL

/ usr/share/doc/ext3grep-0.10.0/LICENSE.GPL2

/ usr/share/doc/ext3grep-0.10.0/NEWS

/ usr/share/doc/ext3grep-0.10.0/README

The above command lists the location where each file is about to be installed, and now we just need to re-locate the installation directory with the-relocate parameter:

The code is as follows:

Rpm-I-- relocate / usr/bin=/home/easwy/bin-- relocate / usr/share/doc=/home/easwy/doc ext3grep-0.10.0-1.el5.rf.i386.rpm

Ext3grep will now be installed in the / home/easwy/bin directory.

At this point, I believe you have a deeper understanding of "how to view and change the default installation path of rpm". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report