############################################################################### rpm - red hat package management command allows you to install (-i) **RPM is an applications that runs on several different platforms to install modular software*** query(-q) verify, build etc software packages in red hat linux. example: rpm -aq -will print all the packages installed rpm -q ppp -would print out wether the ppp pkg was installed simular to pkgadd - pkgrm - pkinfo in Solaris An example of installing module "mkbootdisk" from a cdrom **************** I actually installed mkbootdisk from an external drive, see below for syntax To gain access to this file, you'll first need to mount your Red Hat Linux CD-ROM. Start by inserting the CD-ROM in your system's CD-ROM drive. You'll need to do this while logged in as root. Issue the following commands: mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom You may get an error message from the first command saying that the file exists. That's fine; we just want to make sure that there is a /mnt/cdrom directory on your system. The second command should issue an informational message that /dev/cdrom is being mounted read-only (Note: some systems may not recognize /dev/cdrom. If this is the case, you'll have to replace /dev/cdrom with the appropriate device name for your CD-ROM). Next, issue the following commands (again, while logged in as root): cd /mnt/cdrom/images ls You should see a file with a name similar to: mkbootdisk-1.0-1.i386.rpm Enter the filename *exactly* as shown at the end of an "rpm -Uvh". For example: rpm -Uvh mkbootdisk-1.0-1.i386.rpm The name of the package (mkbootdisk) will be displayed, followed by a series of pound signs (#). After a short time, you'll get a shell prompt. The mkbootdisk package is now installed. No you can head back to the place in this document where you left off, and create your boot diskette. The actual install This also shows upgrading and installing from source rpm [root@rachel SRPMS]# pwd /mnt/Redhat/SRPMS [root@rachel SRPMS]# rpm -Uvh mkbootdisk-1.0-2.src.rpm mkbootdisk ################################################## [root@rachel SRPMS]# ******************************************************************************* A simple install of the AfterStep RPM [root@sparky2 RPMS]# ls |grep -i after AfterStep-1.4.5.3-2.sparc.rpm [root@sparky2 RPMS]# rpm -i AfterStep-1.4.5.3-2.sparc.rpm [root@sparky2 RPMS]# ############################################################################### --- Query options --- rpm - red hat package management command allows you to install (-i) query(-q) verify, build etc software packages in red hat linux. example: rpm -aq -will print all the packages installed rpm -q ppp -would print out wether the ppp pkg was installed simular to pkgadd - pkgrm - pkinfo in Solaris example: rpm -qpi /tmp/AfterStep-1.4.5.3-2.sparc.rpm The above will print a discription of the uninstalled rpm. There are more for sure but these will get you by ############################################################################## An example of installing module "mkbootdisk" from a cdrom **************** I actually installed mkbootdisk from an external drive, see below for syntax To gain access to this file, you'll first need to mount your Red Hat Linux CD-ROM. Start by inserting the CD-ROM in your system's CD-ROM drive. You'll need to do this while logged in as root. Issue the following commands: mkdir /mnt/cdrom mount /dev/cdrom /mnt/cdrom You may get an error message from the first command saying that the file exists. That's fine; we just want to make sure that there is a /mnt/cdrom directory on your system. The second command should issue an informational message that /dev/cdrom is being mounted read-only (Note: some systems may not recognize /dev/cdrom. If this is the case, you'll have to replace /dev/cdrom with the appropriate device name for your CD-ROM). Next, issue the following commands (again, while logged in as root): cd /mnt/cdrom/images ls You should see a file with a name similar to: mkbootdisk-1.0-1.i386.rpm Enter the filename *exactly* as shown at the end of an "rpm -Uvh". For example: rpm -Uvh mkbootdisk-1.0-1.i386.rpm The name of the package (mkbootdisk) will be displayed, followed by a series of pound signs (#). After a short time, you'll get a shell prompt. The mkbootdisk package is now installed. No you can head back to the place in this document where you left off, and create your boot diskette. The actual install [root@rachel SRPMS]# pwd /mnt/Redhat/SRPMS [root@rachel SRPMS]# rpm -Uvh mkbootdisk-1.0-2.src.rpm mkbootdisk ################################################## [root@rachel SRPMS]# ******************************************************************************* To query a machine about the rpms install rpm -qa More on options: Install mode: rpm -i [install-options] + Query mode: rpm -q [query-options] Verify mode: rpm -V|-y|--verify [verify-options] Signature Check mode: rpm --checksig + Uninstall mode: rpm -e + Build mode: rpm -[b|t]O [build-options] + Rebuild database: rpm --rebuilddb Fix permissions: rpm --setperms [query-package-specifiers] Set owners and groups: rpm --setugids [query-package-specifiers] Show RC: rpm --showrc The general form of an rpm install command is rpm -i [install-options] + This installs a new package. The general form of an rpm UPGRADE command is UPGRADE a package rpm -U [install-options] + Build an rpm from a src-rpm file Locate src-rpm: cd /home/keeng1/ cd download <--- this is where you downloaded it to ls mkisofs-1.12b5-6.src.rpm As root, create the rpm package: rpm --rebuild mkisofs-1.12b5-6.src.rpm This will compile the code, so must have the apropreiate compiler and libraries available. As root, install the rpm: cd /usr/src/redhat/RPMS/i386/ ls mkisofs-1.12b5-6.i386.rpm rpm -i mkisofs-1.12b5-6.i386.rpm which mkisofs /usr/bin/mkisofs ######################################################################### I have been looking for a way to use rpm cmd to look at an uninstalled rpm and find out what it is, and a short discription. Finially ------- rpm -qpi uninstalled.rpm rpm -q(query) -p(package file uninstalled, could be a ftp or http site) -i(display package info) I believe the key is the -p option, I think you could use other option for other info besides the -i option. example: -l option will list files in package. -R prints out the files required for package to be installed t and function. #--------------------- Remove, uninstall an RPM ------------------------# Uninstall an rpm UNINSTALL OPTIONS The general form of an rpm uninstall command is rpm -e + --allmatches Remove all versions of the package which match . Normally an error is issued if matches multiple packages. --noscripts Don't execute the preuninstall or postuninstall scripts. --notriggers Don't execute scripts which are triggered by the removal of this package. --nodeps Don't check dependencies before uninstalling the packages. --test Don't really uninstall anything, just go through the motions. Useful in conjunction with the -vv option.