How to Use the yum installation command
Command for installing common software in yum
# Yum check-Update
# Yum remove package name (remove)
# Yum install package name (installation)
# Yum reinstall package name (reinstall)
# Yum update package name
Common usage of Yum commands
Yum-y install package name (* supported): automatically selects y, fully automated
Yum install package name (* supported): manually select y or N
Yum remove package name (not supported *)
Rpm-IVH package name (supported *): Install the RPM package
Rpm-e package name (not supported *): uninstall the RPM package
Parameters
Description
Check-Update
Show software packages that can be upgraded
Clean
Delete the downloaded header. Same as clean all
Clean oldheaders
Delete old headers
Clean packages
Delete the downloaded software package
Info
Show available package information
Info package name
Displays information about a specified software package.
Install package name
Install the specified Software Package
List
Show available software packages
List Installed
Show installed software packages
List updates
Show software packages that can be upgraded
Provides software package name
Displays the files contained in the software package.
Remove package name
Delete the specified software package and confirm the dependency of the specified software package.
Search keywords
Use keywords to search for software packages. The search object is RPM file name, packager (package), dummary, and description.
Update
Upgrade all software packages that can be upgraded
Update package name
Upgrade the specified Software Package
Yum-y install httpd ghost install httpd Apache server and related components online
Yum-y install PHP plugin install PHP online
Yum-y install mysql-Server Plugin install MySQL
Yum-y install PHP-mysql plugin install PHP-MySQL
Upgrade common library files
Yum-y install GCC gcc-C ++ Autoconf
Yum-y install libjpeg-devel libpng-devel FreeType-devel libxml2 libxml2-devel zlib-devel curl-devel ncurses-devel
Install the make command
Yum-y install make
Install vi
Yum-y install vim-enhanced
Run Vim to add a link.
Ln-S/usr/bin/Vim/bin/VI
Install locate
Yum-y install mlocate
Install patch
Yum-y Install patch
Synchronization time
Yum install-y NTP
Ntpdate NTP. API. bz
Where is the yum file installed?
View/etc/yum. conf
There is a cachedir setting. The default value is/var/Cache/yum.
By default, the downloaded files are not saved and will be automatically deleted after installation.
Modify keepcache and change 0 to 1.
That is:
Cachedir =/var/Cache/yum
Keepcache = 1
What is yum?
Yum is the abbreviation of yellowdog Updater modified. Yellowdog is a Linux distribution. RH uses this upgrade technology to build its own distribution to form the current yum. The principle of yum is similar to that of APT, but apt is used to compile code, the execution efficiency is much higher than the yum written in Python. This is the home page of yum.
The yum concept is to use a central repository (repository) to manage the relationship between some or even a distribution application, and perform related upgrade, installation, and deletion operations based on the calculated software dependency, this reduces the dependencies problem that Linux users have always suffered. At this point, yum and APT are the same. APT is originally used by Deb software management of Debian, but now RPM under RH can be used.
Generally, this type of software Describes the network address of the corresponding repository through one or more configuration documents, obtains necessary information from repository and downloads related software packages as needed through HTTP or FTP. In this way, local users can easily perform system upgrade and maintenance when there is an Internet connection by establishing different repository descriptions. In addition, if you want to use a proxy, you can use http_proxy and ftp_proxy to set the standard environment variables in the shell.
The repository is created using the Yum-arch or createrepo command and can be used as an image with the existing repository of others. Here we will discuss how to create a repository.
Basic Yum operations
Basic Yum operations include software installation (local, network), upgrade (local, network), uninstallation, and some query functions.
After setting the local yum, you can easily install it (now we assume that the yum that comes with fc5 is used for installation). If we need to install the Virtual Machine bochs, we can use
# Yum install bochs
If there is a local RPM document, you can use
# Yum localinstall ur. rpm
The former causes Yum to search for the data in the existing repository (usually connect to the repository to download the updated data first). If this software is found, it will analyze its dependencies and then download and install the required software.
You can use
# Yum remove bochs
Or
# Yum erase bochs
This will also eliminate the corresponding dependencies. For example, deleting Firefox will delete R at the same time, because R depends on Firefox.
Update the functionality of a software
# Yum Update Firefox
If the program name is not followed, any software that can be upgraded will be upgraded. If outdated software needs to be processed (such as deleted), it can add the -- obsolete parameter or use upgrade. If you need more automated operations (to avoid answering some questions), you can also add some parameters, such
# Yum-y upgrade
If a system-level upgrade is completed, a large number of RPM and other things will be downloaded, which will occupy a lot of hard disks and can be used
# Yum clean packages
Delete relevant RPM documents. Others include headers, packages, cache, metadata, and all.
View what RPM provides a program to use
$ Yum provides/bin/RPM
And use
$ Yum list rpm
Will list rpm-related information, and
$ Yum List info
Provides detailed instructions for use
$ Yum search rpm
Get all rpm-related programs that can be found. The search object is the description of each program.
For more detailed parameter descriptions, see related man pages. You can find a program named yumdownloader in Yum-utils. He can easily download, such as srpm and other packages.
$ Yumdownloader -- source Firefox
This article is from the "Tiger's technical home" blog!