Wednesday, August 6, 2008

Commands Continued..

RPM Packages ( Fedora, Red Hat and like)

rpm -ivh package.rpm install a rpm package
rpm -ivh --nodeps package.rpm install a rpm package ignoring dependencies requests
rpm -U package.rpm upgrade a rpm package without changing configuration files
rpm -F package.rpm upgrade a rpm package only if it is already installed
rpm -e package_name.rpm remove a rpm package
rpm -qa show all rpm packages installed on the system
rpm -qa | grep httpd show all rpm packages with the name "httpd"
rpm -qi package_name obtain information on a specific package installed
rpm -qg "System Environment/Daemons" show rpm packages of a group software
rpm -ql package_name show list of files provided by a rpm package installed
rpm -qc package_name show list of configuration files provided by a rpm package installed
rpm -q package_name --whatrequires show list of dependencies required for a rpm packet
rpm -q package_name --whatprovides show capability provided by a rpm package
rpm -q package_name --scripts show scripts started during installation / removal
rpm -q package_name --changelog show history of revisions of a rpm package
rpm -qf /etc/httpd/conf/httpd.conf verify which rpm package belongs to a given file
rpm -qp package.rpm -l show list of files provided by a rpm package not yet installed
rpm --import /media/cdrom/RPM-GPG-KEY import public-key digital signature
rpm --checksig package.rpm verify the integrity of a rpm package
rpm -qa gpg-pubkey verify integrity of all rpm packages installed
rpm -V package_name check file size, permissions, type, owner, group, MD5 checksum and last modification
rpm -Va check all rpm packages installed on the system - use with caution
rpm -Vp package.rpm verify a rpm package not yet installed
rpm2cpio package.rpm | cpio --extract --make-directories *bin* extract executable file from a rpm package
rpm -ivh /usr/src/redhat/RPMS/`arch`/package.rpm install a package built from a rpm source
rpmbuild --rebuild package_name.src.rpm build a rpm package from a rpm source



YUM packages updater (Fedora, RedHat and like)


yum install package_name download and install a rpm package
yum localinstall package_name.rpm That will install an RPM, and try to resolve all the dependencies for you using your repositories.
yum update update all rpm packages installed on the system
yum update package_name upgrade a rpm package
yum remove package_name remove a rpm package
yum list list all packages installed on the system
yum search package_name find a package on rpm repository
yum clean packages clean up rpm cache erasing downloaded packages
yum clean headers remove all files headers that the system uses to resolve dependency
yum clean all remove from the cache packages and headers files

No comments: