linux系統程序安裝(一)rpm工具
阿新 • • 發佈:2018-01-08
erl fields program 軟件 方法 owin lib 直接 源碼安裝 linux系統下程序安裝主要采用三種方式:
1、rpm,有點類似.msi 和.exe比較類似,軟件包(相當於windows的某個程序的所有文件)的安裝路徑和文件名稱基本是固定的,但是他不會安裝關聯的包,就像windows下經常會讓你安裝.netframwwork包一樣,你必須已經有一定的系統環境了,你才能順利安裝rpm程序。
2、yum,有點像appstore和安卓的應用商店,yum安裝一個程序時會把關聯的程序一起安裝,確保你裝完後就可以用。
3、源碼包安裝,有點像windows裏面的visualstudio直接寫出來的原始程序,在vs中你需要把程序編譯後才能生成能夠運行的exe,這種方式就和源碼安裝程序方式類似了,我們首先要將源碼包編譯,然後安裝才能使用,這種方式較rpm方式和yum方式復雜。
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 [-選項] [包名或命令名]
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
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.
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工具