Local installation of package in Red Hat / Fedora Linux

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Local installation of package in Red Hat / Fedora Linux
# 1  
Old 01-18-2018
Tools Local installation of package in Red Hat / Fedora Linux

Hi all,

I have a requirement to install rpm package(*noarch.rpm) in local to a directory, ex /tmp/mydir.

which steps I need to follow to install rpm package local to the directory only, not to the default directories.

Please share me the link if the topic is already discussed. I tried few forums, couldnt get right direction.

Thanks,
# 2  
Old 01-19-2018
Hi,

Firstly, not all RPM packages support re-location. The package maintainer has to have designed the package to permit this. Typically many do not, since the software in the package has been compiled with a particular installation path in mind. But if your package is re-locatable this should be fairly simple, and doable with a command like:

Code:
rpm --prefix=/path/to/new/root/ -ivh package.rpm

This would install the package package.rpm underneath the directory /path/to/new/root/, as opposed to underneath / as normal.

If your package is not re-locatable, then you could always just convert the RPM to a cpio archive and manually extract it. Create a directory to extract the contents in, move your RPM in there, and do something like:

Code:
rpm2cpio package.rpm | cpio -div

This would extract the cpio archive inside the RPM underneath the current working directory. Note that of course this is just going to extract the software and you will ultimately have hte same problem - if the package is not meant to be re-located to somewhere else, it's not going to work in a new location.

If you absolutely need to re-locate a package that's not re-locatable, then you could always download its source code and configure it with your desired installation prefix, and compile and install it there.

Hope this helps.
# 3  
Old 01-19-2018
I tried rpm2cpio package.rpm | cpio -div and corresponding files got created. I am planning to install erlang, planning to figure out where to take from here. what command I should run against bin.

Last edited by rbatte1; 01-19-2018 at 01:13 PM.. Reason: Wrapped command in ICODE tags
# 4  
Old 01-19-2018
Hi,

I'm not 100% sure what you mean, sorry. The package will have had its files extracted underneath wherever you ran the cpio command. You might be able to just run /path/to/wherever/bin/whatever and it might just work, but equally it may not. As I mentioned previously, many packages are not designed to be re-locatable, and might misbehave or fail in unexpected ways as a result of not having their binaries, libraries and other support files in the locations they expect to find them. I'm not myself familiar with Erlang at all, so can't really give any package-specific advice here.

If it comes to it, then as I say you can always download the source of the package (assuming it has source code available, almost all packages do generally speaking) and compile it yourself, specifying exactly the directory you want to install the resulting binaries in. You don't normally have to be root or need to have sudo access to compile most things, if user permissions and access rights are ultimately your real problem here.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Red Hat 6 yum install no package availiable

I have installed Red Hat Enterprise Linux 6.1 server, it is registered but not subscribed. If I install using yum every time it is showing that no package available, how to resolve it? (2 Replies)
Discussion started by: ainstin
2 Replies

2. Red Hat

Does Red hat linux 9 has audit rpm package?

Dear All I have a old system run in Red hat Linux 9.. And if it's possible, I want to install the audit rpm package in the Red hat Linux 9. But I can't find the audit-*.rpm file in the Red hat Linux 9's CD..? Can any help me to conform Red hat Linux 9 doesn't support audit? Any... (0 Replies)
Discussion started by: nnnnnnine
0 Replies

3. Red Hat

Fedora or Red Hat Man Pages

Is there a website that has either the Fedora or Red Hat Man Pages? Something similar to this with Ubuntu? Ubuntu Manpage: Welcome (4 Replies)
Discussion started by: cokedude
4 Replies

4. Red Hat

download package for red hat linux 5

I try to do virtual guest in red hat linux 5. But I have no red hat netowrk account . I want to download below package xen kernel-xen package So, where I can get them ?? Any advice ??? (9 Replies)
Discussion started by: chuikingman
9 Replies

5. Red Hat

Installation of Red Hat enterprise edition?

HI All I am new to lunix operating system.I Wnt to move to Lunix.So would u pepole please tell me the documentatiion for installation os lunix on my personal computer Thamnks&Regards, I.venu. (1 Reply)
Discussion started by: infovenu231
1 Replies

6. UNIX Desktop Questions & Answers

Does Red Hat Fedora support Nvidia card 8800GTX and 260 card?

Does Red Hat Fedora support Nvidia card 8800GTX and 260 card? Does any Linux OS support Nvidia card? (1 Reply)
Discussion started by: sito
1 Replies

7. Red Hat

The Red Hat Cluster Manager Installation and

Linux RedHat Cluster Manager InstallationAdministrationGuide (0 Replies)
Discussion started by: merlin
0 Replies

8. UNIX for Dummies Questions & Answers

Problem Red Hat 9 Installation

I have a problem with a red hat 9 install on a compaq laptop. I installed the OS and everything tests ok but It boots to a blank screen instead of the GUI login I wanted. What can I do to correct this instead of installing all over. I tried the rescue option several times and tried to run... (2 Replies)
Discussion started by: vedder191
2 Replies

9. Linux

Installation Problem on Red hat linux 9

Hi, I am trying to install our new acquired Red Hat linux 9 on Compaq Proliant ML370. However, l has already configured the raid 0+1. The linux installation starts from the CD, its allows for the selection of Language, keyboard but l am stocked at choosing the installation package media. I... (4 Replies)
Discussion started by: kayode
4 Replies

10. UNIX for Dummies Questions & Answers

red hat linux installation boot floppy disk

Hi, My dear friends, I am trying to install red hat linux. I have downloaded its disc1. On the instructions page, the next stage is to make the boot disk, so that I can boot from the floppy. However, I am unable to locate the boot image iso file. I tried on google, but I got a few files which... (3 Replies)
Discussion started by: linuxpenguin
3 Replies
Login or Register to Ask a Question