Readhat install yum

Source: Internet
Author: User

 

 

Original article address: in kernel, yum can better solve the dependency problem of RPM. We recommend that you use yum, for example, to install the lynx program on the server in the traditional installation method, you need to go to the Linux installation CD and find the RPM of the lynx package to upload it to the server, and run the rpm-IVH <File Name> method to install it and use the yum management, you only need to run Yum install Lynx to complete the installation. Yum will automatically connect to the Linux update source on the Internet. download the latest package and install it automatically. If lynx is already installed, now you need to upgrade to the latest version and run Yum upgrade Lynx to complete the upgrade. Yum is very easy to use, most installation packages can be obtained from the network without manual upload and installation on the standard Redhat Enterprise Linux. If yum is not installed, download and install it separately. In addition, Redhat Enterprise Linux is a paid service provided by RedHat. However, since Redhat Enterprise Linux and centos are basically common, you can use centos sources to upgrade RedHat 1. first install Yum and related RPM packages. Note: This installation package is only available to the as4 system at [url] http://www.swsoft.com.cn/downloads/prima/tools/yum_foras4.tar.gz#/url].
Or [url] http://www.haoxm.net/tools/yum_foras4.tar.gz#/url] to download and decompress the yum package and upgrade the file rpm-IVH *. rpm 2. copy the extracted CentOS-Base.repo to/etc/yum. repos. d/note in the directory: This CentOS-Base.repo file is only available to the as4 System 3. run the following command to import the GPG key rpm -- import [url] example or rpm -- import [url] http://www.haoxm.net/tools/rpm-gpg-key-centos-4#/url]
Now you can start using yum. The main parameters of Yum include search/install/upgrade/remove. To install a software, such as installing the lynx character browser, You can execute Yum install lynx. Note: 1. Some packages cannot be upgraded when using yum. 2. if you use Yum to upgrade all systems, you will find that after the upgrade, the system version will change from RedHat to centos because the upgrade uses the free centos Yum source, therefore, it is best to select the execution ========================== as shown in the above figure. rpm -- import, an error is always prompted. Later, I found that no DNS is set for Redhat, and no network access is allowed. After the DNS is set, I will be OK again. The first method is:
Yum is from chinalinuxpub.com and uses the centos package,
: Http://www.chinalinuxpub.com/yum.tgz
Installation:
Tar zxvf yum. tgz
CD yum
Rpm-IVH *. rpm

Rm-RF/etc/yum. Repos. d/CentOS-Base.repo
VI/etc/yum. Repos. d/as4-update.repo
Join:
# Released updates
[Update]
Name = Red Hat Enterprise as Release 4 Updates
Base url = http://ftp.chinalinuxpub.com/redhat/enterprise/updates/4AS/
Gpgcheck = 1
Gpgkey = http://ftp.chinalinuxpub.com/redhat/enterprise/RPM-GPG-KEY-linuxpub

VI/etc/yum. Repos. d/as4-base.repo
Join:
# Released Base
[Base]
Name = Red Hat Enterprise as Release 4 Updates
Baseurl = http://ftp.chinalinuxpub.com/redhat/enterprise/ OS /i386/RedHat/ # Here you can change the websites that can be connected
Gpgcheck = 1
Gpgkey = http://ftp.chinalinuxpub.com/redhat/enterprise/RPM-GPG-KEY-linuxpub

Then you can use Yum normally.

Usage:

Yum localinstall *. rpm

Install local packages
Or Yum list | grep XXX. rpm xxx. Run Yum install XXX. RPM to install the package.

/Var/Cache/yum is the place where the file is downloaded. You can modify/etc/yum. conf to change the folder location.

Method 2:

Upgrade RHEL as4 using centos Yum Library

1. download and install the yum-2.4.0-1.centos4.noarch.rpm file, which is:

Ftp://ftp.pbone.net/mirror/ftp.centos.org/4.2/ OS /alpha/CentOS/RPMS/yum-2.4.0-1.centos4.noarch.rpm

2. Modify or create/etc/yum. Repos. d/CentOS-Base.repo as follows:

[Base]

Name = centos-$ releasever-Base

Baseurl = http://ftp.riken.jp/linux/caos/centos/4.0/ OS /?basearch/

Gpgcheck = 1

# Released updates

[Update]

Name = centos-$ releasever-Updates

Baseurl = http://ftp.riken.jp/linux/caos/centos/4.0/updates/?basearch/

Gpgcheck = 1

# Packages used/produced in the build but not released

[Addons]

Name = centos-$ releasever-Addons

Baseurl = http://ftp.riken.jp/linux/caos/centos/4.0/addons/?basearch/

Gpgcheck = 1

# Additional packages that may be useful

[Extras]

Name = centos-$ releasever-extras

Baseurl = http://ftp.riken.jp/linux/caos/centos/4.0/extras/?basearch/

Gpgcheck = 1

3. Modify or create/etc/yum. Repos. d/Dag. Repo as follows:

[Dag]

Name = Dag RPM repository for RHEL4

Baseurl = http://ftp.riken.jp/linux/dag/redhat/el4/en/?basearch/dag/

Enabled = 1

Gpgcheck = 1

Gpgkey = http://ftp.riken.jp/Linux/dag/packages/RPM-GPG-KEY.dag.txt

4. Run update:

Yum update

5. Upgrade:

Yum upgrade

6. install other software, such:

Yum install mplayer

Method 3

Http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.7-1.noarch.rpm download, and install Yum after installation should note that the three files
/Etc/cron. daily/yum. cron # Upgrade Yum and other software packages on a daily basis
/Etc/init. d/Yum # Yum Service
/Etc/yum. conf # Yum configuration file

Next, modify/etc/yum. conf.
VI/etc/yum. conf

Set
[Base]
Name = Red Hat Linux $ releasever-$ basearch-Base
Baseurl = http://developer.dulug.duke.edu/pub/yum-repository/redhat/?releasever/#basearch/

[Updates]
Name = Red Hat Linux $ releasever-Updates
Base url = http://mirror.dulug.duke.edu/pub/yum-repository/RedHat/updates/$ releasever/

Change

[Base]
Name = centos 4.4 For RHEL4-base # Get the name as needed
Base url = http://mirror.be10.com/centos/4.4/ OS /i386/

[Updates]
Name = centos 4.4 For RHEL4-Updates # Get the name as needed
Base url = http://mirror.be10.com/centos/4.4/updates/i386/

Enter the command
Yum update

Install the software tool Yum on Linux
Keyword: Yum

Common installation and upgrade tools on Linux include Yum and apt.
Among them, yum can better solve the dependency problem of RPM. We recommend that you use yum.

In the standard Redhat Enterprise Linux, yum is not installed by default and needs to be downloaded and installed separately.
In addition, Redhat Enterprise Linux is a paid service provided by RedHat.
However, because Redhat Enterprise Linux and centos are basically common, you can use centos sources to upgrade RedHat.

1. First install Yum and related RPM packages
Http://www.swsoft.com.cn/downloads/Prima/Tools/yum_forAS4.tar.gz

Download and decompress the yum package and upgrade File
Rpm-IVH *. rpm

2. Import the PGP key of the system.
Rpm -- import/usr/share/RHN/RPM-GPG-KEY

3. Copy the extracted CentOS-Base.repo to the/etc/yum. Repos. d/directory.

4. Run the following command:
Rpm -- import http://mirror.be10.com/centos/RPM-GPG-KEY-CentOS-4

Now you can start using yum. The main parameters of Yum include search/install/upgrade/remove.
To install a software, such as installing the lynx character browser, You can execute
Yum install lynx

 

 

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.