Fedora / Redhat Online install an update package, yum articles ── to the Beginner's Guide (reprint)

Source Address: http://fedora.linuxsir.org/main/?q=node/31

====================================================

Author: North-South-North
from: League of Legends Community
Abstract: We use Redhat / Fedora install the update packages via online, in addition to the system comes with the up2date, we have a more powerful tool for online upgrade yum and apt-get available . The main resources freshrpms.net and rpm.livna.org;

In this paper, we mainly introduce Fedora core 4.0 solution through the package management tool to install software online yum update; apt tool on the application, we will explain in another article in;


A, yum use;

some beginner Linux brothers may ask, why not use the system comes with graphical tools up2date to upgrade, but the whole yum yet. In fact, everyone with a use to know, up2date is really very unresponsive, and often unresponsive; cause your machine to suspended animation. So we try yum; in addition freshrpms.net may be faster than the official source of the upgrade of the station, there is no reason not to use yum;

1, we need to download the following address with their system corresponding version of yum;

http://ayo.freshrpms.net/

For example, I use the package is installed Fedora core 4.0 downloaded follows;

[root@localhost beinan]# rpm -ivh freshrpms-release-1.1-1.fc.noarch.rpm
warning: freshrpms-release-1.1-1.fc.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e42d547b
Preparing... ########################################### [100%]
1:freshrpms-release ########################################### [100%]



2, install the software, for example;

for example, I want to be able to listen to install the mp3 bmp-mp3, simply enter the following command lines, the system on their own work;

[root@localhost beinan]# yum install bmp-mp3

 

Panoramic contents as follows:

 

[root@localhost beinan]# yum install bmp-mp3
Setting up Install Process
Setting up repositories
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
freshrpms                 100% |=========================|  951 B    00:00
Reading repository metadata in from local files
primary.xml.gz            100% |=========================|  42 kB    00:03
freshrpms : ################################################## 122/122
Added 122 new packages, deleted 0 old in 0.72 seconds
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for bmp-mp3 to pack into transaction set.
bmp-mp3-0.9.7-1.2.fc4.i38 100% |=========================| 2.9 kB    00:00
---> Package bmp-mp3.i386 0:0.9.7-1.2.fc4 set to be updated
--> Running transaction check
--> Processing Dependency: libid3-3.8.so.3 for package: bmp-mp3
--> Processing Dependency: libbeep.so.2 for package: bmp-mp3
--> Processing Dependency: bmp >= 0.9.7 for package: bmp-mp3
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for id3lib to pack into transaction set.
id3lib-3.8.3-11.fc4.i386. 100% |=========================|  38 kB    00:05
---> Package id3lib.i386 0:3.8.3-11.fc4 set to be updated
---> Downloading header for bmp to pack into transaction set.
bmp-0.9.7-10.fc4.i386.rpm 100% |=========================|  14 kB    00:03
---> Package bmp.i386 0:0.9.7-10.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
bmp-mp3                 i386       0.9.7-1.2.fc4    freshrpms          95 k
Installing for dependencies:
bmp                     i386       0.9.7-10.fc4     extras            912 k
id3lib                  i386       3.8.3-11.fc4     extras            752 k

Transaction Summary
=============================================================================
Install      3 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 1.7 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): id3lib-3.8.3-11.fc 100% |=========================| 752 kB    01:04
(2/3): bmp-0.9.7-10.fc4.i 100% |=========================| 912 kB    02:14
(3/3): bmp-mp3-0.9.7-1.2. 100% |=========================|  95 kB    00:05
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: bmp                          ######################### [1/3]
  Installing: id3lib                       ######################### [2/3]
  Installing: bmp-mp3                      ######################### [3/3]

Installed: bmp-mp3.i386 0:0.9.7-1.2.fc4
Dependency Installed: bmp.i386 0:0.9.7-10.fc4 id3lib.i386 0:3.8.3-11.fc4
Complete!

 


Note: yum advantage: package dependencies be resolved, such as the above, we can see that we had just installed the bmp-mp3, results id3lib yum install also installed; bmp


Second, the little usage of yum;


1, the query packages;

in front of thousands of software, we may be unable to start, and sometimes do not know the file name; then we should use the query; we can use yum list to list on the yum upgrade package source files have ; then we come back to see info
there are several combinations can be used; for example;

[root@localhost beinan]# yum list |more


Plus a pipeline |, and more about, you can put all the packages page is displayed. Then press the space bar will be able to see the next page. In the software list that appears, there will be software name, version, whether the installation; a careful look at it. Familiar enough. There is no difficulty.

 

 

[root@localhost beinan]# yum list |more
Setting up repositories
Reading repository metadata in from local files
Installed Packages
4Suite.i386                              1.0-8.b1               installed
Canna.i386                               3.7p3-13               installed
Canna-devel.i386                         3.7p3-13               installed

 

For more information on the software if you want to know, you may have to spend a parameter info. such as:

usage:

[root@localhost beinan]# yum info 软件名


such as:

 

 

[root@localhost beinan]# yum info bmp-mp3
Setting up repositories
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
freshrpms                 100% |=========================|  951 B    00:00
Reading repository metadata in from local files
Installed Packages
Name   : bmp-mp3
Arch   : i386
Version: 0.9.7
Release: 1.2.fc4
Size   : 234 k
Repo   : freshrpms
Summary: MP3 playback plugin for the Beep Media Player

Description:
This package contains an MP3 playback plugin for BMP (Beep Media Player),
a media player that uses a skinned user interface based on Winamp 2.x skins,
and is based on ("forked off") XMMS.

 

In the above example, if the Repo: freshrpms like this, your system does not install the software, if the display is: Repo: installed, has already been installed.

Query package, also can add parameters grep, for example, we would like to check whether there is a new version of the kernel upgrade source, then we can use the following command to query; of course you can also use [root @ localhost beinan] # yum search kernel | more, that is, yum --help provided parameters, is the same;

[root@localhost beinan]# yum list |grep kernel


We look at the results of operation of the machine, as follows:

 

 

[root@localhost beinan]# yum list |grep kernel
GFS-kernel.i686                          2.6.11.8-20050601.1526 installed
cman-kernel.i686                         2.6.11.5-20050601.1526 installed
dlm-kernel.i686                          2.6.11.5-20050601.1526 installed
gnbd-kernel.i686                         2.6.11.2-20050420.1331 installed
kernel.i686                              2.6.11-1.1369_FC4      installed
kernel-devel.i686                        2.6.11-1.1369_FC4      installed
kernel-doc.noarch                        2.6.11-1.1369_FC4      installed
GFS-kernel.i586                          2.6.11.8-20050601.1526 base
GFS-kernel-debuginfo.i686                2.6.11.8-20050601.1526 updates-released
GFS-kernel-debuginfo.i586                2.6.11.8-20050601.1526 updates-released
GFS-kernel-smp.i686                      2.6.11.8-20050601.1526 base
GFS-kernel-xen0.i686                     2.6.11.8-20050601.1526 base
GFS-kernel-xenU.i686                     2.6.11.8-20050601.1526 base
cman-kernel.i586                         2.6.11.5-20050601.1526 updates-released
cman-kernel.i686                         2.6.11.5-20050601.1526 updates-released
cman-kernel-debuginfo.i586               2.6.11.5-20050601.1526 updates-released
cman-kernel-debuginfo.i686               2.6.11.5-20050601.1526 updates-released
cman-kernel-smp.i686                     2.6.11.5-20050601.1526 updates-released
cman-kernel-xen0.i686                    2.6.11.5-20050601.1526 updates-released
cman-kernel-xenU.i686                    2.6.11.5-20050601.1526 updates-released
dlm-kernel.i686                          2.6.11.5-20050601.1526 updates-released
dlm-kernel.i586                          2.6.11.5-20050601.1526 updates-released
dlm-kernel-debuginfo.i586                2.6.11.5-20050601.1526 updates-released
dlm-kernel-debuginfo.i686                2.6.11.5-20050601.1526 updates-released
dlm-kernel-smp.i686                      2.6.11.5-20050601.1526 updates-released
dlm-kernel-xen0.i686                     2.6.11.5-20050601.1526 updates-released
dlm-kernel-xenU.i686                     2.6.11.5-20050601.1526 updates-released
gnbd-kernel.i686                         2.6.11.2-20050420.1331 updates-released
gnbd-kernel.i586                         2.6.11.2-20050420.1331 updates-released
gnbd-kernel-debuginfo.i586               2.6.11.2-20050420.1331 updates-released
gnbd-kernel-debuginfo.i686               2.6.11.2-20050420.1331 updates-released
gnbd-kernel-smp.i686                     2.6.11.2-20050420.1331 updates-released
gnbd-kernel-xen0.i686                    2.6.11.2-20050420.1331 updates-released
gnbd-kernel-xenU.i686                    2.6.11.2-20050420.1331 updates-released
kernel.i586                              2.6.12-1.1398_FC4      updates-released
kernel.i686                              2.6.12-1.1398_FC4      updates-released
kernel-debuginfo.i686                    2.6.12-1.1398_FC4      updates-released
kernel-debuginfo.i586                    2.6.12-1.1398_FC4      updates-released
kernel-devel.i586                        2.6.12-1.1398_FC4      updates-released
kernel-devel.i686                        2.6.12-1.1398_FC4      updates-released
kernel-doc.noarch                        2.6.12-1.1398_FC4      updates-released
kernel-smp.i686                          2.6.12-1.1398_FC4      updates-released
kernel-smp-devel.i686                    2.6.12-1.1398_FC4      updates-released
kernel-xen0.i686                         2.6.12-1.1398_FC4      updates-released
kernel-xen0-devel.i686                   2.6.12-1.1398_FC4      updates-released
kernel-xenU.i686                         2.6.12-1.1398_FC4      updates-released
kernel-xenU-devel.i686                   2.6.12-1.1398_FC4      updates-released


Above it does show a lot of kernel-related, installed means that our system has been installed;

 

Let's look before a bar, look at the name can almost guess; such as doc recognition and documentation about the kernel; smp kernel multiprocessor; the other I do not understand, please brothers want to know with info look at it.

For example, we use a single-processor machine is X86 machine, wanted to see if there are new kernel is available. So let's try this below. To see whether a new kernel can be upgraded;

[root@localhost beinan]# yum info kernel.i686


[root@localhost beinan]# yum info kernel.i686
Setting up repositories
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
freshrpms                 100% |=========================|  951 B    00:00
Reading repository metadata in from local files
Installed Packages
Name   : kernel
Arch   : i686
Version: 2.6.11
Release: 1.1369_FC4
Size   : 37 M
Repo   : installed
Summary: Linux 内核(Linux 操作系统的核心)。

Description:
kernel 软件包包含 Linux 内核 (vmlinuz),Red Hat Linux
操作系统的核心。内核处理操作系统的基本功能:
分配内存、处理分配、设备的输入和输出等等。

Available Packages
Name   : kernel
Arch   : i686
Version: 2.6.12
Release: 1.1398_FC4
Size   : 14 M
Repo   : updates-released
Summary: The Linux kernel (the core of the Linux operating system)
Description:
The kernel package contains the Linux kernel (vmlinuz), the core of any
Linux operating system.  The kernel handles the basic functions
of the operating system:  memory allocation, process allocation, device
input and output, etc.

 

Through the above information, we can see that 2.6.11 is already installed, because it has been shown that the Repo: installed, followed by a Version: 2.6.12, tell us Repo: updates-released, it seems that this is with the upgrade.

So if the upgrade to see ours.

 

[root@localhost beinan]# yum update kernel


Panoramic upgrade the kernel as follows:

 

 

[root@localhost beinan]# yum update  kernel
Setting up Upgrade Process
Setting up repositories
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:00
freshrpms                 100% |=========================|  951 B    00:00
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for kernel to pack into transaction set.
kernel-2.6.12-1.1398_FC4. 100% |=========================| 174 kB    00:18
---> Package kernel.i686 0:2.6.12-1.1398_FC4 set to be installed
--> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
kernel                  i686       2.6.12-1.1398_FC4  updates-released   14 M

Transaction Summary
=============================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 14 M
Is this ok [y/N]:

 

Is not an upgrade, only need Is this ok [y / N]: the back row or N input y; y yes, an nod is the mean; N No means is shaking his head.

For packages of inquiry, as well, such as:

[root@localhost beinan]# yum list available 列出所有升级源上的包;
[root@localhost beinan]# yum list updates 列出所有升级源上的可以更新包;
[root@localhost beinan]# yum list installed 列出已经安装的包;

 

yum command supports wildcards; for example;

 

[root@localhost beinan]# yum list mp* |more
Setting up repositories
Reading repository metadata in from local files
Installed Packages
mpage.i386                               2.5.4-5                installed
Available Packages
mpc.i386                                 0.11.2-3               extras
mpeg2dec.i386                            0.4.0-5b.2.fc4         freshrpms
mpeg2dec-devel.i386                      0.4.0-5b.2.fc4         freshrpms
mpg321.i386                              0.2.10-6.2.fc4         freshrpms
mplayer.i386                             1.0-0.16.pre7.2.fc4    freshrpms
mplayer-docs.i386                        1.0-0.16.pre7.2.fc4    freshrpms
mplayer-fonts.noarch                     1.1-3.fc               freshrpms
mplayer-skins.noarch                     1.7-1.fc               freshrpms
[root@localhost beinan]#



2. Installation and upgrade package;

installation and upgrades are install and update parameter; for example;

[root@localhost beinan]# yum update firefox


So that we can upgrade the firefox.

 

 

[root@localhost beinan]# yum update firefox
Setting up Update Process
Setting up repositories
updates-released          100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
base                      100% |=========================| 1.1 kB    00:03
freshrpms                 100% |=========================|  951 B    00:02
Reading repository metadata in from local files
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package firefox.i386 0:1.0.6-1.1.fc4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Updating:
firefox                 i386       1.0.6-1.1.fc4    updates-released   18 M

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       1 Package(s)
Remove       0 Package(s)
Total download size: 18 M
Is this ok [y/N]:

 

What if no arguments update would it be? ?

 

[root@localhost beinan]# yum update


Try to run it and see? Will be good for a long time, the system is fully updated, and we want to y N a.

3. Remove the packages use to remove parameters; for example;

[root@localhost beinan]# yum remove bmp-mp3

 

Panoramic contents as follows:

[root@localhost beinan]# yum remove bmp-mp3
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package bmp-mp3.i386 0:0.9.7-1.2.fc4 set to be erased
--> Running transaction check

Dependencies Resolved

=============================================================================
Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
bmp-mp3                 i386       0.9.7-1.2.fc4    installed         234 k

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       1 Package(s)
Total download size: 0
Is this ok [y/N]:

按y就移除了;



Three, yum graphical tools;

see: "yum update online software upgrade introduced a graphical tool"

to help four, yum is;

there are a lot of interested brothers look and see yourself in the forums; but do not forget the self-help; Oh . . . .

 

 

[root@localhost beinan]# yum --help

    Usage:  yum [options] < update | install | info | remove | list |
            clean | provides | search | check-update | groupinstall |
            groupupdate | grouplist | groupinfo | groupremove |
            makecache | localinstall | shell >

        Options:
        -c [config file] - specify the config file to use
        -e [error level] - set the error logging level
        -d [debug level] - set the debugging level
        -y - answer yes to all questions
        -R [time in minutes] - set the max amount of time to randomly run in
        -C run from cache only - do not update the cache
        --installroot=[path] - set the install root (default '/')
        --version - output the version of yum
        --exclude=package to exclude
        --disablerepo=repository id to disable (overrides config file)
        --enablerepo=repository id to enable (overrides config file)

        -h, --help  - this screen

 

There are even more powerful help;

[root@localhost beinan]#man yum



Reproduced in: https: //www.cnblogs.com/licheng/archive/2010/10/21/1857187.html

Guess you like

Origin blog.csdn.net/weixin_34204057/article/details/92627112