linux系统程序安装rpm工具
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux系统程序安装rpm工具相关的知识,希望对你有一定的参考价值。
linux系统下程序安装主要采用三种方式:
1、rpm,有点类似.msi 和.exe比较类似,软件包(相当于windows的某个程序的所有文件)的安装路径和文件名称基本是固定的,但是他不会安装关联的包,就像windows下经常会让你安装.netframwwork包一样,你必须已经有一定的系统环境了,你才能顺利安装rpm程序。
2、yum,有点像appstore和安卓的应用商店,yum安装一个程序时会把关联的程序一起安装,确保你装完后就可以用。
3、源码包安装,有点像windows里面的visualstudio直接写出来的原始程序,在vs中你需要把程序编译后才能生成能够运行的exe,这种方式就和源码安装程序方式类似了,我们首先要将源码包编译,然后安装才能使用,这种方式较rpm方式和yum方式复杂。
接下来三篇博客将分别讨论三种程序安装方式的方法
一、rpm工具
rpm工具原本是Red Hat Linux发行版专门用来管理Linux各项套件的程序,由于它遵循GPL规则且功能强大方便,因而广受欢迎,逐渐受到其他发行版的采用。
(一)rpm包名称含义
查来查去只有Wiki英文有。
An RPM is delivered in a single file, normally in the format:
<name>-<version>-<release>.<architecture>.rpm
such as:libgnomeuimm-2.0-2.0.0-3.i386.rpm
where <name> is libgnomeuimm, <version> is 2.0, <release> is 2.0.0-3, and <architecture> is i386.
Source code may also be distributed in RPM packages in which case the <architecture> part is specified as src as in, libgnomeuimm-2.0-2.0.0-3.src.rpm
RPMs with the noarch.rpm extension refer to packages which do not depend on a certain computer‘s architecture. These include graphics and text for another program to use, and programs written in interpreted programming languages such as Python programs and shell scripts.
The RPM contents also include a package label, which contains the following pieces of information:
software name
software version (the version taken from original upstream source of the software)
package release (the number of times the package has been rebuilt using the same version of the software). This field is also often used for indicating the specific distribution the package is intended for by appending strings like "mdv" (formerly, "mdk") (Mandriva Linux), "mga" (Mageia), "fc4" (Fedora Core 4), "rhl9" (Red Hat Linux 9), "suse100" (SUSE Linux 10.0) etc.
architecture for which the package was built (i386, i686, x86_64, ppc, etc.)
The package label fields do not need to match the filename.
命令语法:rpm [-选项] [包名或命令名]
选项:
-a
以上是关于linux系统程序安装rpm工具的主要内容,如果未能解决你的问题,请参考以下文章
linux应用程序基础及安装方式(RPM,YUM和源代码编译)!