How to install yum in linux

Source: Internet
Author: User

 

If you use YUM to install software, you don't need to look for the dependency RPM everywhere. Very convenient.

 

Step 1: Install yum

 

Step 2: download and install the createrepo package:

 

Ftp: // 195.220.108.108/linux/dag/redhat/el4/en/i386/dag/RPMS/createrepo-0.4.6-1.el4.rf.noarch.rpm

 

Installing the createrepo package rpm-ivh createrepo-0.4.6-1.el4.rf.noarch.rpm

 

When software preparation is complete, the following describes how to create a repo file.

 

Step 3: mount the downloaded RHEL4.6-i386-AS-DVD.iso to local and complete the yum local source configuration

 

[Root @ Lovehack mnt] # mkdir/mnt/RHELAS4 // create a RHELAS4 file to mount ISO

 

[Root @ Lovehack mnt] # mount-o loop RHEL4.6-i386-AS-DVD.iso/mnt/RHELAS4 // mount iso

 

[Root @ Lovehack mnt] # mkdir/mnt/repodata // create a repodata folder

 

[Root @ Lovehack mnt] # ln-s/mnt/RHELAS4/RedHat/RPMS/*. rpm/mnt/repodata // link all the rpm Images

 

[Root @ Lovehack mnt] # createrepo/mnt/repodata // create repomd. xml and other required files. This process is relatively long.

1536/1536-vino-2.8.1-1.i386.rpm

Saving Primary metadata

Saving file lists metadata

Saving other metadata

 

[Root @ Lovehack mnt] # cd/etc/yum. repos. d // enter the yum folder to create a repo file and back up the original. repo File

 

[Root @ Lovehack yum. repos. d] # ls

 

As4-base.repo.bak as4-update.repo.bak backup CentOS-Base.repo.bak

 

[Root @ Lovehack yum. repos. d] # vi iso. repo // create an iso. repo file with the following content:

 

[Iso]

Name = iso

Baseurl = file: // mnt/repodata

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // mnt/RHELAS4/RPM-GPG-KEY

 

Step 4: [root @ Lovehack yum. repos. d] # yum update

 

Setting up Update Process

Setting up repositories

Iso 100% | =================================| 951 B

Reading repository metadata in from local files

Primary.xml.gz 100% | =======================| 589 kB

Iso: ######################################## ######## 1536/1536

Added 1536 new packages, deleted 0 old in 17.81 seconds

No Packages marked for Update/Obsoletion

Step 5: Install all the things you want.

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.