Red Hat installation and configuration yum

Source: Internet
Author: User
Tags gpg

I took over a server at the company and was ready to do something I wanted to do. I found that even Vim was unavailable. It was okay. I installed it myself. The tragedy found that even Yum was not installed .....

The environment of the server is Red Hat Enterprise Linux as Release 4 (nahant update 8), which is eight hundred years old and the server configuration is okay. Now, let's start working on things. My goal is:

    1. 1. Install Yum and configure the centos source. Select the source of Netease 163.
    2. 2. Install Vim using yum

First from this articleArticleTo install yum in Red Hat, follow the steps below to install yum

First download the RPM package of yum

 

CD/SYR/local/
Wget-C http: // Yum.baseurl.org/download/2.0/yum-2.0.8-1.src.rpm

Use rpm for Installation

 

Rpmbuild -- rebuild Yum- 2.0 . 8 - 1 . SRC. rpm
CD/usr/src/RedHat/RPMS/noarch/
Rpm-IVH Yum- 2.0 . 8 - 1 . Noarch. rpm

An error occurs when running yum.

 

Retrygrab () failed For : Http: // Developer.dulug.duke.edu/pub/yum-repository/redhat/4as/ I #/headers/header.info
Executing failover Method
Failover: Out of servers Try
Error getting File HTTP: // Developer.dulug.duke.edu/pub/yum-repository/redhat/4as/ I #/headers/header.info
[Errno 4] ioerror:

Red Hat's default source is too old to be updated. You have to replace it with the 163 source.

Modify the yum. conf configuration file

 

VI/etc/yum. conf

Detailed configuration is as follows:

 

[Main]
Cachedir =/var/Cache/yumdebuglevel = 2
Logfile =/var/log/yum. Log
Pkgpolicy = newest
Installonlypkgs = kernel-SMP kernel-devel kernel-smp-devel kernel-largesmp-devel kernel-hugemem-devel
Distroverpkg = centos-release
Tolerant = 1
Exactarch = 1
Retries = 20
Obsoletes = 1
Gpgcheck = 1
Plugins = 1
# Put your repos here or in separate files named file. Repo
# In/etc/yum. Repos. d

 

According to the instructions in section 163, configure/Etc/yum. Repos. d/CentOS-Base.repoFile to install vim.

First find the vim installation package

 

 

Yum list | grep Vim

The vim-related packages are listed.

 

Vim-minimal.i386. 3.046-2. el4.1 installed
Vim-X11.i386 1:6. 3.046-2. el4.1 Base
Vim-common.i386 1:6. 3.046-2. el4.1 Base
Vim-enhanced.i386 1:6. 3.046-2. el4.1 Base

Install the vim-enhanced.i386 package.

 

Yum install vim-enhanced.i386

Will prompt you whether to import GPG key, just enter y

 

Warning: rpmts_hdrfromfdno: V3 DSA Signature: nokey, key ID 443e1821
Public Key for vim-enhanced-6.3.046-2.el4.1.i386.rpm Is Not Installed
Retrieving GPG key from http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Importing GPG key 0x443e1821 & Quot; The CentOS-4 key & Quot;
Is this OK [Y/n]: Y

Finally, the installation was successful. Vim I love you.

 

Key imported successfully
Running transaction Test
Finished transaction Test
Transaction test succeeded
Running transaction
Installing: vim-common ######################### [1/2]
Installing: vim-enhanced ########################## [2/2]
Installed: vim-enhanced.i386. 3.046-2. el4.1
Dependency installed: vim-common.i386. 3.046-2. el4.1
Complete!

 

Done!

 

 

 

From: http://www.xbc.me/install-yum-on-red-hat/

 

 

 

 

 

 

 

 

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.