Chinese use the RPM command under Linux Introduction

2011-04-01  来源:本站原创  分类:OS  人气:80 

Original Address: http://bbs.51cto.com/topic/thread-700076.html

1 What is the rpm?

rpm the RedHat Package Management, is the invention of one of the RedHat
2 Why do I need rpm?

In an operating system, the need to install software packages to achieve various functions. These packages generally have their own procedures,

But also have complex dependencies. Also need to address the package version, as well as installation, configuration,

Unloading automation problems. To address these issues, RedHat system for their own proposed a better approach

To manage hundreds of software. This is the RPM management system. In the system after installing the rpm management system,

Rpm file as long as they meet the standard packaged programs can be easily install, upgrade, uninstall.

[Align = left] 3. Is not all linux use rpm? [/ Align] Any system needs to package management system, so a lot of [url = http://jiaogen.com/] [color = black] linux [/ color] [/ url] use the rpm system. rpm and the system is Redhat Linux

Fedora Core package manager, but Mandriva, SuSE and other Linux distributions use rpm. As rpm

The source code can be compiled on other systems, so there may be other systems also use rpm. In addition rpm,

Other systems also have their own package manager, such as the debian deb package.

[Align = left] 4.rpm package file name Why so long? [/ Align] rpm package file name contains the package version information, operating system information, hardware requirements, etc.

For example mypackage-1.1-2RH.i386.rpm, which mypackage is registered in the system the name of the package 1.1

The software version number, issue number 2, RH RH operating system that is used. i386 said for intel x86 platform.

[Align = left] 5. A package file name in the i386, i686 mean [/ align] rpm package file name, not only includes the software name, version information, including the hardware architecture of the applicable information.

i386 refers to the package for intel 80386 more than the x86 architecture computer (AI32)

i686 refers to the package for intel 80686 or more (Pentium pro and above) of the x86 architecture computer (IA32)

noarch means the package has nothing to do with the hardware architecture, can be common.

i686 packages are usually optimized for the CPU, the configuration of the machines are now usually use i686 packages.

[Align = left] 6. Different operating system can issue the rpm package mix? [/ Align] to have been compiled into a binary rpm package, because the operating system environment is different, generally can not be mixed.

For src.rpm release package, because when you need to install locally compiled, it can usually be installed in different systems.

[B] two, RPM package management uses [/ b]

1, you can install, remove, upgrade and management of the rpm package distributed as software;

2, one can check which rpm package contains the files, and specify the files belong to which a rpm package;

3, you can query the system in a rpm package is installed and its version;

4, as developers can develop their own software packages labeled rpm release;

5, the dependence of the inspection, check to install a rpm package, you need what the other rpm package.

NOTE: RPM software installation, delete, update only to be root to use;

For any user can query feature operation.

[B] three, rpm's a little simple usage [/ b]

[Align = left] rpm of the general format: [/ align] rpm [options] [rpm package]

[Align = left] 1, initialize the rpm database (can be omitted) [/ align] rpm - initdb

rpm - rebuilddb% Note: This takes a long time

% Note: Sometimes the rpm system is a problem, can not be installed and queries, mostly a problem here.

[Align = left] 2, RPM package management query function: [/ align] rpm-q [select-options] [query-options]

[Align = left] RPM's query function is very powerful, it is extremely important features; here a few common examples of more specific detail, refer to man rpm [/ align] [align = left] [ i] software has been installed on the system, the query [/ i] [/ align] 1) the query system has been installed software

Syntax: rpm-q Software Name

Example: rpm-q mplayer

%-Q is - query, this option means your system is not installed gaim package;

% If you have installed will have the information output; If not, will not install gaim output of information;

% View the system has been installed in all packages, to add the-a parameter

rpm-qa

% If the page view, plus a pipe | and more command

rpm-qa | more

% If you want to find a package, can be extracted with grep

rpm-qa | grep mplayer

2) query an already-installed files belong to which package;

Syntax: rpm-qf filename

Note: the file name where the absolute path to that

Example: rpm-qf / usr / lib / libacl.la

3) query the installed packages are installed where they are;

Syntax: rpm-ql package names

Example: rpm-ql mplayer

4) query an installed package information

Syntax: rpm-qi package names

Example: rpm-qi mplayer

5) look at the installed software configuration files;

Syntax: rpm-qc Software Name

Example: rpm-qc mplayer

6) Check the documentation that have been installed software installation location:

Syntax: rpm-qd Software Name

Example: rpm-qd mplayer

7) look at the installed software packages rely on and documents;

Syntax: rpm-qR Software Name

Example: rpm-qR mplayer

[B] Note [/ b]: Several parameters can be combined with, such as rpm-qil mplayer

[Align = left] [i] is not installed package for viewing [/ i]: View the premise that the current directory already exists. Rpm files. [/ Align] 1) view the use of a software package, version and other information;

Syntax: rpm-qpi file.rpm

Example: rpm-qpi mplayer-1.0pre7try2-2.i386.rpm

2) Check the package contains a file;

Syntax: rpm-qpl file.rpm

Example: rpm-qpl mplayer-1.0pre7try2-2.i386.rpm

3) Check the location of the document package;

Syntax: rpm-qpd file.rpm

Example: rpm-qpd mplayer-1.0pre7try2-2.i386.rpm

4) View a package's configuration file;

Syntax: rpm-qpc file.rpm

Example: rpm-qpc mplayer-1.0pre7try2-2.i386.rpm

5) Check dependencies of a package

Syntax: rpm-qpR file.rpm

Example: rpm-qpR mplayer-1.0pre7try2-2.i386.rpm

[Align = left] 3, the package installation, upgrade, delete, etc.; [i] to install and upgrade a rpm package [/ i] [/ align] syntax:

rpm-ivh file.rpm% This is used to install a new rpm package

rpm-Uvh file.rpm% This is used to upgrade a rpm package

% If there is dependency, the need to resolve dependencies.

% If you can not find the dependencies of the package, you can use the following command to force the installation:

rpm-ivh - nodeps - force file.rpm

rpm-Uvh - nodeps - force file.rpm

Example:

rpm-ivh - test mplayer-1.0pre7try2-2.i386.rpm

% - Test that the test does not really install.

rpm-ivh - relocate / = / usr / local / mplayer mplayer-1.0pre7try2-2.i386.rpm

% Specify the installation directory for the package: to add - relocate parameter

% Installed in the specified directory in the program how to call it?

%, Usually executable programs are placed in the bin under the installation directory or sbin directory.

[Align = left] [i] remove a rpm package [/ i] [/ align] first identified the need to remove the rpm package, then use the following command to uninstall:

rpm-e package names

Example: rpm-e mplayer% uninstall mplayer

% If there are other rpm depending on the rpm package, the system will be a warning.

% If you have to uninstall, you can use the option - nodeps ignore dependencies. But best not to do so.

[B] four, RPM Package Manager to support management and query network installation [/ b]

rpm [options] rpm package http or ftp address

For example, we want to Fedora Core 4.0, a query image, the installation package.

rpm-qpi [url] http://mirrors.kernel.org/.../RPMS/rsh-0.17-29.rpm [/ url]

% Query

rpm-ivh [url] http://mirrors.kernel.org/.../RPMS/rsh-0.17-29.rpm [/ url]

% Install

[B] five, have been installed [url = http://linuxrpminstall.jiaogen.com/] [color = black] linux rpm [/ color] [/ url] bag check point to add [/ b]

Use locate to check some of the software is installed, you may need to run updatedb to update the installed software library

[B] six, extract files from rpm package [/ b]

rpm2cpio xxx.rpm | cpio-idmv

% I extract that file, v indicates that the process of implementation

% D said that according to the original package file to create the directory path

% M that keep the file updated

相关文章
  • Chinese use the RPM command under Linux Introduction 2011-04-01

    Original Address: http://bbs.51cto.com/topic/thread-700076.html 1 What is the rpm? rpm the RedHat Package Management, is the invention of one of the RedHat 2 Why do I need rpm? In an operating system, the need to install software packages to achieve

  • Good memory as bad written 2 Linux rpm command 2011-09-01

    Linux RPM command (1) linux rpm Universal options -V Display additional information -Vv Display debugging information - Root for the specified path as the RPM "root", so that pre-installation and post installation program will install into this

  • Linux operating system using the RPM command parameters Xiangjie 2010-03-24

    In the Linux operating system, a system package, its function is similar to Windows inside the "Add / Remove Programs", but the function surpasses the "Add / Remove Programs" strong lot, it is the Red Hat Package Manager (referred to a

  • Linux, RPM command parameters used Xiangjie 1 2010-05-12

    In the Linux operating system, a system package, its function is similar to Windows inside the "Add / Remove Programs", but the function surpasses the "Add / Remove Programs" strong lot, it is the Red Hat Package Manager (referred to a

  • Linux RPM command system 2010-05-26

    In the Linux operating system, a system package, its function is similar to Windows inside the "Add / Remove Programs", but the function surpasses the "Add / Remove Programs" strong lot, it is the Red Hat Package Manager (referred to a

  • rpm command Introduction 2010-06-23

    What is the rpm? rpm RPM package manager is the abbreviation of the first companies from the RedHat package standard, and later as the rpm increases but the continuous development of many of the features, gradually becoming recognized linux package m

  • Linux RPM command parameters used in the Detailed 2010-11-02

    In the Linux operating system, there is a system package, its function is similar to Windows inside the "Add / Remove Programs", but the feature off than the "Add / Remove Programs" a lot stronger, it is the Red Hat Package Manager (re

  • chkconfig command. linux introduction of seven levels 2010-11-20

    Reprinted from: http://hi.baidu.com/yo_life/blog/item/44f0022216b054ae4723e88f.html chkconfig command, linux introduction of seven levels Function: Check and set the system's various services. Syntax: chkconfig [- add] [- del] [- list] [system servic

  • Under the Linux rpm command summary 2010-09-10

    rpm-Uvh to install the mean parameters are updated, if you do not install these packages using rpm-ivh parameters needed to view the package parameter is rpm-qa | grep package name. Rpm related issues with the rpm command to see just fine. rpm-qa: Vi

  • Daquan svn command under linux (rpm) 2011-09-06

    Daquan svn command under linux 1, checkout the file to a local directory svn checkout path (path is the directory on the server) For example: svn checkout svn: / / 192.168.1.1/pro/domain Shorthand: svn co 2, to add a new repository file svn add file

  • mysql command under linux 2010-05-24

    mysql command under linux (2010-04-14 18:09:36) reproduced Tags: topics for one, to summarize: 1.linux start the mysql command: mysqladmin start / Ect / init.d / mysql start (in front of the installation path for the mysql) 2.linux next restart mysql

  • VI command under Linux 2011-05-25

    Vi editor command under linux Daquan / Folder under the root directory type "/", enter the folder there are many, such as: etc, home, lib, mnt, etc. etc: storing user name and password home: Every user has a folder, stored here lib: operating sy

  • history command under linux to use 2011-04-20

    If you often use the Linux command, then use the history command will no doubt enhance your work efficiency. History command is used to display the contents of the history of recorded instructions, the instructions issued in the historical record. 1>

  • Detailed two full rpm command 2011-06-17

    Detailed options First, with the option to install the specified 1.hash (or-h): # display the installation progress in If a large package, installation time, the users wishing to keep abreast of the progress of the installation, you must use this opt

  • Detailed three full rpm command 2011-06-17

    General options <br /> so-called common option is whether to install, upgrade, or uninstall other packages operate all that apply. This option is mainly the following: 1.-v: displays additional information Under normal circumstances, RPM and many LI

  • Vi editor command under linux Daquan 2010-08-30

    Vi editor command under linux Daquan Vi editor under linux command Encyclopaedia (online find drops) 2007-04-23 / Folder under the root directory type "/" Enter there are many folders Such as: etc, home, lib, mnt, etc. etc: storing user name and

  • Ps command under Linux Summary 2010-10-12

    [Transfer] http://flatfish2000.javaeye.com/blog/504887 Ps command under Linux Summary 1) ps a show all the procedures under the existing terminal, including other users of the program. 2) ps-A shows all programs. 3) ps c lists the program, each progr

  • Sar command in Linux 2010-10-13

    Sar command in Linux sar this thing, and initially thought it was a house there, the original is an external tool to http://pagesperso-orange.fr/sebastien.godard/download.html to download 1 Installation tar zxvf xxx.tar.gz . / Configure make make ins

  • Change the host name. RPM command parameters. VI skills. Decompress and install. Rpm Package Download 2010-11-05

    Change the host name The first step: # Hostname oratest Step two: Modify / etc / sysconfig / network hostname in The third step: Modify / etc / hosts file A, change ip address with immediate effect: # Ifconfig eth0 192.168.0.20 netmask 255.255.255.0

  • I used the Linux command top - Linux real-time monitoring task 2010-12-05

    I used the Linux command top - Linux real-time monitoring task This link: http://codingstandards.javaeye.com/blog/833730 (reprint, please indicate the source) Use Description Linux top command to display the task conditions (display Linux tasks), typ