- The rpm command is a management tool for RPM packages. rpm was originally a program used by the Red Hat Linux distribution to manage various Linux suites. It is very popular because it follows the GPL rules and is powerful and convenient. But the biggest trouble of installing software with rpm is that you need to manually find a series of dependencies required to install the software. Not to mention the super trouble. If the software is no longer needed and needs to be uninstalled, other software cannot be used because a certain dependency is uninstalled. is very annoying. Happily, Fedora has finally launched a command yum similar to apt in ubuntu, which makes the installation of Fedora software simple and easy.
- yum (full name Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and RedHat and SUSE. Based on RPM package management, it can automatically download and install RPM packages from a specified server, and can automatically handle dependencies, and install all dependent software packages at one time, without the need to download and install tediously again and again. yum provides commands to find, install, delete a certain, a group or even all packages, and the commands are concise and easy to remember.
rpm common commands:
rpm -ivh your-package.rpm //install rem file
rpm -e proftpd-1.2.8-1 //Uninstall the software, or use the following command
rpm -e proftpd-1.2.8
rpm -e proftpd
rpm -qa list all installed packages
Where is rpm -ql nginx installed, or use which nginx
yum description
All yum configuration information is placed in the file /etc/yum.conf:
[main] cachedir=/var/cache/yum/$basearch/$releasever //cache files keepcache = 0 debuglevel=2 logfile=/var/log/yum.log //Log file exactfile=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=5 bugtracker_url=http://bugs.centos.org/set_project.php?project_id=19&ref=http://bugs.centos.org/bug_report_page.php?category=yum distroverpkg=centos-release # PUT YOUR REPOS HERE OR IN separate files named file.repo # in /etc/yum.repos.d
Users can configure their own rpm software source, write it as a *.repo file, and put it in the directory /etc/yum.repos.d, such as configuring the download address of nginx nginx.repo:
[nginx] name=nginx repo baseurl = http: //nginx.org/packages/centos/6/$basearch/ gpgcheck=0 enabled=1
yum common commands
1 Installation
yum install install all
yum install package1 installs the specified installation package package1
yum groupinstall group1 installer group group1
2 Updates and upgrades
yum update update all
yum update package1 update the specified package package1
yum check-update checks for updatable programs
yum upgrade package1 upgrades the specified package package1
yum groupupdate group1 upgrade program group group1
3 Find and display
yum info package1 shows the installation package information package1
yum list shows all installed and installable packages
yum list updates shows updatable packages
yum list installed shows installed packages
yum list package1 shows the installation status of the specified package package1
yum groupinfo group1 Display program group group1 information yum search string Find the installation package according to the keyword string
4 Remove programs
yum remove | erase package1 delete package package1
yum groupremove group1 delete program group group1
yum deplist package1 View program package1 dependencies
5 Clear cache
yum clean packages clears the packages in the cache directory /var/cache/yum
yum clean headers clears the headers in the cache directory /var/cache/yum
yum clean oldheaders clears the old headers under the cache directory /var/cache/yum
yum clean, yum clean all (= yum clean packages; yum clean oldheaders) Clear the packages and old headers in the cache directory
refer to
http://man.linuxde.net/rpm
http://www.cnblogs.com/chuncn/archive/2010/10/17/1853915.html