码迷,mamicode.com
首页 > 系统相关 > 详细

linux系统程序安装(一)rpm工具

时间:2018-01-08 21:07:38      阅读:149      评论:0      收藏:0      [点我收藏+]

标签:pre   rap   name   graphics   put   red   been   pack   命令   

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工具

标签:pre   rap   name   graphics   put   red   been   pack   命令   

原文地址:http://blog.51cto.com/11934539/2058791

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!