• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where rpm is installed

 
may Lee
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
 
Alton Hernandez
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.
 
George Brown
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.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE 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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic