RHELES6 is automatically upgraded through yumupdate

Source: Internet
Author: User
Find the mirror site closest to yourself through the http://mirror-status.centos.org website I use mirrors.163.com as our mirror site 1. to use the CentOS source, you must remove or disable the RHEL update source and delete the YUM tool that comes with RHEL6. # Cd/etc/yum. repos. d # mvpackagekit-media.repopackagekit-me

Find the mirror site closest to yourself through the http://mirror-status.centos.org website

Here I use mirrors.163.com as our image site

1. To use the CentOS source, you must remove or disable the RHEL update source and delete the YUM tool that comes with RHEL6.

# Cd/etc/yum. repos. d

# Mv packagekit-media.repo packagekit-media.repo.back

Back up the data for accidental recovery. If any other source settings are available, delete the data or back up the data using the preceding methods.

2. Download the source configuration file:

# Cd/etc/yum. repos. d

Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

In this configuration file, you need to modify it in some places. Otherwise, you cannot connect to the server for updates. The variable -- $ releasever indicates the system version number, this article is based on version 6, so you need to replace all the variable names in the configuration file with 6. Here we will use a sed syntax

# Vim/etc/yum. repos. d/CentOS6-Base-163.repo

Press Esc and enter

: 1, % s/$ releasever/6/g

Save and exit. At this time, RHEL6 uses the CentOS source to solve the problem. However, there is a point that needs to be mentioned. The solutions written by many experts on the internet end with an upgrade using the configured source, such as # yum update.

What I want to say is, if you like the RHEL interface and appearance, don't try it lightly. Otherwise, you will regret it, this will make your system the same as CentOS, but keep the original kernel, but it is not used as the default startup item... That is, it is equivalent that you have installed an RHEL6 kernel in centos6. Although the two kernels are the same, it is not against the intention to separate them due to different names?

Therefore, if you do not mind this, please do not be lazy, need to upgrade, or need to install which software to operate, this is also the purpose of setting this source.

3. Download and import the KEY
Cd/etc/pki/rpm-gpg
Wget http://mirrors.163.com/centos/6/ OS /i386/RPM-GPG-KEY-CentOS-6

Rpm -- import/etc/pki/rpm-gpg/RPM-GPG-KEY *

After completing the preceding operations, you can use yum to perform the update operation.

4. yum command
Note: When the yum or yum resource library is updated for the first time, yum will automatically download all the required headers and place them in the/var/cache/yum Directory, which may take a long time.
Rpm package update
* Check for updatable rpm packages
# Yum check-update
* Update all rpm packages
# Yum update
* Update the specified rpm package, such as updating the kernel and kernel source
# Yum update kernel-source
* For a large-scale version upgrade, unlike yum update, the old obsolete package is also upgraded.
# Yum upgrade
Installation and deletion of rpm packages
* Install rpm packages like xmms-mp3
# Yum install xmms-mp3
* Delete the rpm package, including the packages that are dependent on the package.
# Yum remove licq
* Note: You will also be prompted to delete licq-gnome, licq-qt, and licq-text.
Parameters related to yum temporary storage (/var/cache/yum /)
* Clear the temporary rpm package file
# Yum clean packages
* Clear the temporary rpm header file
# Yum clearn headers
* Clear the existing rpm header files.
# Yum clean oldheaders
* Clear the existing rpm header files and package files.
# Yum clearn or # yum clearn all
* Note: equivalent to yum clean packages + yum clean oldheaders
Package list
* List all rpm packages that can be installed or updated in the resource library.
# Yum list
* List specific rpm packages that can be installed, updated, and installed in the resource library.
# Yum list mozilla
# Yum list mozilla *
* Note: Match characters can be used in the rpm package name. For example, all rpm packages starting with mozilla are listed.
* List all the rpm packages that can be updated in the resource library.
# Yum list updates
* List all installed rpm packages
# Yum list installed
* List the installed rpm packages that are not included in the resource library
# Yum list extras
* Note: download and install the rpm package from other websites.
Rpm package information display (the info parameter is the same as the list)
* List all rpm packages that can be installed or updated in the resource library.
# Yum info
* List the specified rpm packages in the resource library that can be installed or updated and that have been installed.
# Yum info mozilla
# Yum info mozilla *
* Note: Match characters can be used in rpm package names, for example, to list all rpm packages starting with mozilla
* List all the rpm packages that can be updated in the resource library.
# Yum info updates
* List information of all installed rpm packages
# Yum info installed
* Lists the installed rpm packages that are not included in the resource library.
# Yum info extras
* Note: Download the installed rpm package information from other websites.
Search for rpm packages
* Search for rpm packages matching specific characters
# Yum search mozilla
* Note: Search for rpm package names and package descriptions
* Search for rpm packages with specific file names
# Yum provides realplay
5. Add a resource library
* For example, add rpm.livna.org as the resource library.
* Install Livna.org rpms GPG key
# Rpm-import
Http://rpm.livna.org/RPM-LIVNA-GPG-KEY

* Check the GPG Key
# Rpm-qa gpg-pubkey *
* Display Key information
# Rpm-qi gpg-pubkey-a109b1ec-3f6e28d5
* (Note: If you want to delete the Key, use the # rpm-e gpg-pubkey-a109b1ec-3f6e28d5)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.