linux - yum command

yum (called the Yellow dog Updater, Modified) is a front end package manager Shell Fedora and RedHat and SUSE in. Based on RPM packages can be automatically downloaded from the server specified RPM package and install, can be handled automatically dependencies and install all of the software packages depend, again without cumbersome download, install. yum provides search, install, remove one, or all of a set of packages command, and command concise and easy to remember.

yum command form is generally as follows: yum [options] [command] [package ...]
where [options] are optional, options -h (help), - y (the installation process when prompted to select all " yes "), - q (not show the installation process) and the like. [command] to the operation to be performed, [package ...] is the operation of the object.

Summarizes some commonly used commands include:

Automatically search for the fastest mirror plug-ins: yum install yum-fastestmirror
install yum graphical widget: yum install yumex
see a list of possible mass installation: yum grouplist

1 Installation

yum install all installed
yum install Package1 specified installation package installed Package1
yum groupinsall Setup group group1 group1

2 updates and upgrades

All updates yum update
yum update Package1 specified update package Package1
yum-Update Check can check the updated program
yum upgrade package1 upgrade the specified package Package1
yum groupupdate upgrade program from group1 group1

3 Find and display

yum info package1 display package installation information Package1
yum List shows all installed and can install the package
yum list package1 display the specified package installation Package1
yum GROUPINFO group group1 group1 display program information yum search string to find the installation package keyword string

4 Remove Programs

yum remove & # 124; erase package1 remove packages package1
yum groupremove Remove Programs group group1 group1
yum deplist package1 viewer package1 dependent on circumstances

5 Clear Cache

yum clean packages remove the package under the cache directory
headers under yum clean headers clear the cache directory
yum clean oldheaders cleared under the old headers cache directory
yum clean, yum clean all (= yum clean packages; yum clean oldheaders) Clear the cache directory under packages and old headers

For example, to install the game program group, first of all to find:
#: yum grouplist
can be found, you can install the game package name is " Games and Entertainment ", so that you can install:
yum groupinstall ": # Games and Entertainment "
All game package is automatically installed. Here Games and Entertainment name must use double quotes selected, because encounter the following linux box would think that the end of the file name, so the name must tell the system installation package is "Games and Entertainment" instead of "Games".

In addition, the profile can also modify the selection /etc/yum.conf installation source. Yum seen how to configure the program to facilitate it. More detailed options and commands, of course, as long as the following at the command line prompt: man yum

yum groupinstall "KDE (K Desktop Environment)"

yum install pirut k3b mikmod

yum groupinstall "Server Configuration Tools"

yum groupinstall "Sound and Video"

#yum groupinstall "GNOME Desktop Environment"

yum groupinstall "Legacy Software Support"

yum groupinstall "Development Libraries"

yum groupinstall "Development Tools"

#yum groupinstall "Windows File Server"

yum groupinstall "System Tools"

yum groupinstall "X Window System"

yum install php-gd
yum install gd-devel
yum groupinstall "Chinese Support"


#yum install samba-common // The execution will install samba-client together
#yum install samba

yum install gcc
yum install cpp
yum install gcc-c++
yum install ncurses
yum install ncurses-devel
yum install gd-devel php-gd
yum install gd-devel
yum install gcc
yum install cpp
yum install gcc-c++
yum install ncurses
yum install ncurses-devel
yum install gd-devel php-gd
yum install gd-devel
yum install zlib-devel
yum install freetype-devel freetype-demos freetype-utils
yum install libpng-devel libpng10 libpng10-devel
yum install libjpeg-devel
yum install ImageMagick
yum install php-gd
yum install flex
yum install ImageMagick-devel


System-config-install # yum bind         
# yum groupinstall "the DNS the Name Server" // install bind and bind-chroot package
yum groupinstall "MySQL Database" '

yum clean all

-----------------------------------------------------------------------------------------------------------

I installed a fedora linux can not use Chinese input is a very tricky thing, and even search solutions found no law. Barely a few spelling luck, see Google can not recognize the. And I met such a thing.
Solution:
yum -y install scim *

yum command Detailed:
Redhat and Fedora software install command is rpm, but with the greatest trouble rpm to install software is the need to manually find a series of dependencies to install the required software, super trouble is not that, if the software without the need to uninstall then due uninstall a certain dependency caused by other software can not be very annoying. Happily, Fedora finally launched similar in ubuntu's apt command yum, so Fedora software installation becomes simple and easy. Yum has the following features:
* You can configure multiple resource library (Repository)
* Simple configuration file (/etc/yum.conf)
* resolved automatically add or remove reliance of the problems encountered rpm package
* Easy to use
* Maintain and RPM database consistency of
yum, Yellow dog Updater Modified is referred to, initially by the yellow dog that releases developer Terra Soft R & D, written in python, then still called yup (yellow dog updater), after Duke University of Linux @ Duke team to improve, we had this name. yum aim is to automate the upgrade, install / remove rpm package, collect information about the rpm package, checks the dependencies and automatically prompts the user to resolve. The key point is to have a reliable yum repository, the name suggests, this is software repository, it can be http or ftp site, the software can also be a local pool, but must include the header rpm, header includes a variety rpm package information, including descriptions, features, documentation provided, dependence, etc. It is these header collected and analyzed in order to complete the remaining tasks automation.
1.yum all configuration information is stored in a configuration file called yum.conf, usually located in the / etc directory, which is the top priority of the entire system of yum, I was in F9 to view this file, you with a look at:
[hanlong@localhost F9常用文档]$ sudo more /etc/yum.conf
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

Following is a brief of the brief description of the document:
cacheDir is: yum cache directory, yum rpm packages and databases in this storage download, usually / var / cache / yum.
debuglevel: debug level, 0──10, the default is 2
logfile: yum log file, the default is /var/log/yum.log.
exactarch, there are two options 1 and 0, does it mean you just upgrade and install packages cpu system consistent package, if set to 1, such as a rpm i386 you installed, then yum will not use the package to upgrade 686 .
gpgchkeck = 0 and 1 have two options, whether to represent the gpg check whether, if not this one, it seems, by default checked.
2. Well, the next step is to use the yum, yum first used to upgrade software, operating mostly yum must have superuser privileges, of course, you can use sudo.
yum update, this step is necessary, yum will download the rpm from header header directory server, on the local cache, it may take some time, but compared yum convenience brought us to spend those hours He has counted what is it? header download is complete, yum will determine whether there is a package that can be updated, if there is, it will ask you for advice, whether to update, or that it y, the system is always up to date always good, yum then start downloading software rpm installation package and use the call, which may take some time, depending on the number you want to update the software and network status, if the network is broken, it does not matter, then it once. The upgrade is completed, after just use yum check-update check every day with a new look at whether, and if so, to be used with new yum update, keep the system for the latest vulnerabilities, blocking all found. To upgrade a single package with yum update packagename.
Now some simple software upgrade command yum list here:
(Update: When I installed wine with a rpm of an installation, install relations since then the installation of the main package wine, but just to find a good post on the forum, yum on local installation parameters Yes. the -localinstall
Y U m L O C a L I n- S T a L L W I n- E - * this kind of case , Y U m will be from moving safety means that there is a by Lai off line , but not with R & lt P m Yi Ge Yi Ge 'sAn installation of , save a better and more work for . Also has Yi Ge with his class like the reference number : yumlocalinstallwine- * In this case, yum will automatically install all the dependencies instead of rpm installed one by one, save a lot of work. There is also a similar argument with him: yum localupdate wine- *
If there is a new version of the wine, and you can also download the arrival of local, so you can update the local wine of. )

1. List all the updated software inventory
command: yum check-update

2. Install all software updates
Command: yum update

3. Only install software specified in
the command: yum install

4. Only the specified software update
command: yum update

5. List all installable software inventory
command: yum list

3. Use yum to install and uninstall the software, there is a premise that is yum install rpm package format.
Installation command is, yum install xxx, yum will query the database, with or without this package, if there is, then check its dependent relationship conflict, if not rely on conflict, so best to download and install; if so, it will be given prompt asking whether you want to install dependence, or delete the conflicting package, you can make your own judgment
command to delete is, yum remove xxx, as with the installation, yum will query the database, gives tips to resolve dependencies.
1. Use YUM to install packages
Command: yum install

2. Delete the package with YUM
command: yum remove

4. Query software you want to install using yum
we often encounter such a situation, you want to install a software, only that it and certain aspects relating to, but not exactly know its name. Then yum query feature is working. You can use this command yum search keyword to search, for example, we want to install a Instant Messenger, but do not know in the end what, this time may wish to search for such a command yum search messenger, yum will search all the available rpm description of , lists all the relevant descriptions and messeger rpm package, so we may get gaim, kopete, etc. and choose from there.
Sometimes we also encounter the installation of a package, but do not know its purpose, we can use yum info packagename this command to obtain information.
1. Use YUM to find package
command: yum Search
2. List all installed packages
command: yum List
3. List all updated package
command: yum the Updates List
4. List all installed packages
command: yum List installed
5. the list of all installed but not within the package yum Repository
command: yum List Extras
6. the package lists specified
command: yum list 7. use yUM acquiring package information
command: yum info 8. List all package information
command: yum info
9. the updated list of all available package information
command: yum info updates
10. the list of all installed package information
Command: yum info Installed
11. lists all installed but not in the package information Yum Repository
command: yum info extras
which are listed in the file 12. The package provides
command: yum provides

5. Clear YUM cache
yum will download the package and the header is stored in the cache are not automatically deleted. If we feel that they take up disk space, you can use yum clean commands to clear, more precise usage is yum clean headers clear the header, yum clean packages remove the downloaded rpm package, yum clean all clear all
1. Clear the cache directory (/ var package under / cache / yum)
command: yum clean packages

2. headers clear the cache directory (/ var / cache / yum) under

Command: yum clean headers

The old headers 3. Clear the cache directory (/ var / cache / yum) under

命令:yum clean oldheaders

4. packages and old headers clear the cache directory (/ var / cache / yum) under

命令:yum clean, yum clean all (= yum clean packages; yum clean oldheaders)

Above all command parameters can be used to see the man:
1, install a graphical version yumex: yum install yumex.
2, installation of additional software warehouse:
rpm.livna.org package repository:
RPM -ivh  http://livna-dl.reloumirrors.net  ... EASE-7-2.noarch.rpm

freshrpms.net package repository:
RPM -ivh  http://ftp.freshrpms.net/pub/fre  ... 1.1-1.fc.noarch.rpm

3, the fastest source mounting yum install yum-fastestmirror

Resource is really rich, from Centos to Ubuntu, ISO image, upgrade package, everything, and paid the brothers really happy, envy ah. Fortunately, however, whatever the outcome, we can be considered within the education network, make do can dip the light, download some.
Available at: ftp://ftp.sjtu.edu.cn/

相应的yum的repo为
[updates]
name=Fedora updates
baseurl=ftp://ftp.sjtu.edu.cn/fedora/linux/updates/releasever/releasever/basearch/
enabled=1
gpgcheck=0
[fedora]
name=Fedora releaseverreleasever−basearch
baseurl=ftp://ftp.sjtu.edu.cn/fedora/linux/releases/releasever/Everything/releasever/Everything/basearch/os/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

If apt manager installed on the machine, the corresponding source
. Leave the repomd  ftp://ftp.sjtu.edu.cn/  Fedora / Linux / Updates / ( V E R & lt S the I O N ) / (VERSION) / (the ARCH ) /

repomd ftp://ftp.sjtu.edu.cn/ fedora/linux/releases/(VERSION)/Everything/(VERSION)/Everything/(ARCH)/os/

There are some differences on this front with the format of the source of yum, need attention.

Guess you like

Origin www.cnblogs.com/lyh233/p/12563490.html