A, rpm command
1, the query RPM packages installed information
Format: rpm -q + + software sub-option name
Usage: -qa: RPM software to view all of the installed package
-qi: View details specified package
-ql: Query package installation forehead directory, a list of files
-qf + file or directory name: Query file or directory belongs to which RPM package
-qp + sub-options + RPM package file: Query is not installed package file
Example:
(1) check whether the package is installed bash
rpm -q bash
(2) query package installation file directory postfix
rpm -ql postfix
(3) query which package vim is installed
rpm -qf /usr/bin/vim
(4) query package file is not installed
rpm -qpi ethtool-3.5-1.el6.x86_64.rpm
2, install, upgrade RPM software
Format: rpm + Option + RPM package file
Usage: -i install a new rpm package file
-U If you do not install the upgrade will be installed
-h with "#" sign shows the installation progress
-v show details during installation
Rpm -F update a software installation is aborted if not installed
--force force the installation of a software package (generally do not)
3, uninstall the RPM software
Format: rpm -e + Software name
4, rebuilding the RPM database
rpm --rebuilddb
rpm --initdb
Second, the warehouse building YUM
1, mount the CD
Uninstall CD: umount / dev / sr0
Mount the CD: mount / dev / sr0 / media /
View: ls / media /
2, modify this YUM warehouse client profile
Build local YUM repository document: cd /etc/yum.r*
mkdir a/
mv C* a/
Creating local YUM repository document: vi ./local.repo
[Cdrom] // names warehouse
name=cdrom
baseurl = file: /// media // specified location rpm package
enabled = 1 // enable the local YUM repository
Disable gpgcheck = 0 // check gpg
3, removal, reconstruction YUM cache: yum -y clean all
yum makecache
4, query, install, uninstall, query vdftpd: rpm -q vsftpd
yum -y install vsftpd
rpm -q vsftpd
yum -y remove vsftpd
rpm -q vsftpd
Description: -y: do not interact
Third, the source code compiler installation
1, by xftp other tools httpd-2.2.17.tar passed linux virtual machine