------------------------------------------------------------------------------- RPM General List package and info rpm -qilp {package}.rpm What dependancys (requirements) does it need rpm -qRp {package}.rpm Install with progress bar rpm -ihv {package}.rpm Follow dependancys (in same directory, using "rpmdb" database) rpm -hiv --aid {package}.rpm rpmlist csh alias Formated search of the rpm database for installed package alias rpmlist \ 'rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE}:%{SUMMARY}\n" \\ | sort | awk -F: '\''/\!:1/{printf "%-22s %s\n",$1,$2}'\' Use local yum to install This lets yum find and install any extra dependancies the rpm may need automatically. yum localinstall /path/to/package-1.0.0-1.i386.rpm Dependancies (requires and is required by) rpm -q --requires xyzzy rpm -q --whatrequires xyzzy What package will install file or library "xyzzy" (if needed by another package). Install the rpmdb-redhat package then use rpm -q --whatprovides xyzzy rpm -q --redhatprovides xyzzy ------------------------------------------------------------------------------- RPM from SRPM sources Build a RPM directly from a source RPM rpmbuild --rebuild {package}.src.rpm Then install rpm -ihv /usr/src/redhat/RPMS/i386/{package}.i386.rpm NOTE: yum can NOT download SRPM packages at this time. Build step by step package=??? # get sources rpm -ihv $package-*.src.rpm yum-builddep $package # %files -- check all prerequesite files are avaiable rpmbuild -bl /usr/src/redhat/SPECS/$package.spec # %prep -- extract / apply all patches -- in /usr/src/redhat/BUILD rpmbuild -bp /usr/src/redhat/SPECS/$package.spec # %build -- compile the binaries patched (above and manually) sources rpmbuild --short-circuit -bc /usr/src/redhat/SPECS/$package.spec # %install -- install the just built binaries rpmbuild --short-circuit -bi /usr/src/redhat/SPECS/$package.spec # Unpack and build the appropriate RPM's from installed package rpmbuild -bb /usr/src/redhat/SPECS/$package.spec # Rebuild SRPM source package (after changes to patching or sources tar) rpmbuild -bs /usr/src/redhat/SPECS/$package.spec Clean out the whole source area rm -rf /usr/src/redhat/RPMS/*/* \ /usr/src/redhat/{SRPMS,SOURCES,SPECS,BUILD}/* \ /var/tmp/rpm-tmp.* chown -R anthony.anthony /usr/src/redhat ------------------------------------------------------------------------------- Unpackage RPM without installing... mkdir t cd t rpm2cpio .../RPM.rpm | cpio -idmv ------------------------------------------------------------------------------- RPM from TAR source Found on GQview web site, how this workes is another matter. When complete, the new binary package can be found in /usr/src/redhat/RPMS/i386 rpm -tb xxx-x.x.x.tar.gz ------------------------------------------------------------------------------- Install package sudo yum install xine Local copy sudo yum localinstall ImageMagick-6.2.5-5.i386.rpm Remove it and any dependancys nolonger in use sudo yum remove rhythmbox Install package_group sudo yum groupinstall 'MySQL Database' Update All sudo yum update Update just package sudo yum update xine List available packages yum list xine yum list '*mp3*' yum grouplist List description for a package yum info junit search for string in package name and description yum search mp3 look for a package providing a library yum provides libneon To turn on auto updates do.. chkconfig yum on service yum start NOTE: this does not actually run a service, it just enables the "/etc/cron.daily/yum.conf" cron job to auto-update the system at 4am ------------------------------------------------------------------------------- Create 'os' yum repository from DVD create the i386/os cpdir /DVD_mount/ /path/to/i386/os cd /path/to/i386/os yum install createrepo createrepo -g repodata/comps.xml . -------------------------------------------------------------------------------