This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

where rpm is installed

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When we install rpm in Redhat 9, what acturally happen? where the package is installed, where the bin, man, doc, config or directory? Could anyone give me a rough idea? how to find them?
Thanks. I am not new to Linux, not clear about this concept

For example, when I run rpm from /mnt/cdrom

rpm -ivh vnc-server, it is put on different places like/usr/bin/Xvnc,/usr/bin/vncserver, /usr/share/man...

rpm -ivh httpd-devel-2.0.40.21, I don't know what happen
 
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by may Lee:
When we install rpm in Redhat 9, what acturally happen? where the package is installed, where the bin, man, doc, config or directory? Could anyone give me a rough idea? how to find them?
Thanks. I am not new to Linux, not clear about this concept

For example, when I run rpm from /mnt/cdrom

rpm -ivh vnc-server, it is put on different places like/usr/bin/Xvnc,/usr/bin/vncserver, /usr/share/man...

rpm -ivh httpd-devel-2.0.40.21, I don't know what happen



The one who built the rpm will determine where the individual files are to be placed although they normally follow certain convention. If you want to know where the files are to be installed, do an rpm -qipl first.
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May,

You may want to check out this rpm how-to
It's clear and concise, and should make the workings of rpm a bit clearer.
 
Saloon Keeper
Posts: 22678
153
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, there's 2 parts. The RPM itself registers in the RPM database. I think the default one's somewhere like /var/rpms. I'm not in front of a RH machine at the moment, so I can't check.

The RPM database just tracks which RPMs are installed, and is used to ensure that prerequsites are matched and conflicts are resolved when installing new RPMs or removeing existing ones. It's also what gets used to provide the snaswer to the "rpm -qa" command.

RPMS themselves are the equivalent of ZIP files (or at least tarballs) with scripts attached. That's a gross oversimplification, but a good starting point. Part of the package is a manifest that tells what files will go where. The great thing about using RPMs over simple ZIP/tar files is that thanks to this list, you can distribute files in the most convenient places like /etc, /usr/bin and so forth instead of lumping them together under /usr/local/myapp and having a long nasty PATH list, having to run all over the filesystem looking for config files to backup, and so forth.

The scripting facility is optional. The RPM spec handles standard file copying and prerequisite detection using the manifest. You only need to code scripts if you want to customize the installation/removal of a package or do checking above and beyond what's basic to RPM.

RPMs are fun to create, and, unlike Windows installers, you not only get assistance in installation/removal, you can also check installed packages for damage (rpm -V) and find out where the files got installed (rpm -ql).
 
I love a good mentalist. And so does this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic