Linux uses a CD to build a local YUM server

Source: Internet
Author: User
Today, when I got a test environment, I lost some packages. when I installed the rpm package, the dependency was very troublesome. so I thought of using a CD to build a local yum server.

Today, when I got a test environment, I lost some packages. when I installed the rpm package, the dependency was very troublesome. so I thought of using a CD to build a local yum server. Here are the specific setup steps. using yum can help solve the dependency problem.

 

I have also compiled an article, which uses the ftp format:

Build a YUM server in Linux

Http://blog.csdn.net/tianlesoftware/article/details/6113902

 

The steps are also simple, as shown below:

 

1. create a media loading Directory

Mkdir/media/disk

 

2. Insert a system disc

Generally, all the required RPM packages are available on the system disk. Therefore, you can directly obtain the RPM packages from the system disk instead of downloading them from the Internet.

 

3. mount the media to the directory we created earlier.

Mount/dev/cdrom1/media/disk

 

4. create a yum configuration file

[Root @ rac2/] # touch/etc/yum. repos. d/anqing. repo

-- The file name can be specified by yourself.

 

5. add the following content to the yum configuration file:

[Dave] -- you can specify it here

Name = Dave YUM Server -- you can also specify it here

Baseurl = file: // media/disk/Server/

Gpgcheck = 0

Enabled = 1

 

6. verify YUM:

 

[Root @ rac2 yum. repos. d] # yum update

Loaded plugins: refresh-packagekit

Dave | 3.7 kB...

Dave/primary_db | 3.1 MB...

Setting up Update Process

No Packages marked for Update

 

-- Find the libXp package

[Root @ rac2/] # rpm-qa | grep libXp

LibXpm-3.5.8-2.el6.x86_64

LibXp-1.0.0-15.1.el6.x86_64

 

-- Uninstall the libXp package

[Root @ rac2/] # rpm-e libXp-1.0.0-15.1.el6.x86_64

 

-- Install the libXp package:

[Root @ rac2/] # yum-y install libXp

Loaded plugins: refresh-packagekit

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package libXp. x86_640: 1.0.0-15.1.el6 will be installed

--> Finished Dependency Resolution

 

Dependencies Resolved

 

========================================================== ========================================================== ================================

Package Arch Version Repository Size

========================================================== ========================================================== ================================

Installing:

LibXp x86_64 1.0.0-15.1.el6 dave 22 k

 

Transaction Summary

========================================================== ========================================================== ================================

Install 1 Package (s)

-- The yum configuration file is displayed here.

 

Total download size: 22 k

Installed size: 39 k

Downloading Packages:

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Warning: RPMDB altered outside of yum.

Installing: libXp-1.0.0-15.1.el6.x86_64 1/1

 

Installed:

LibXp. x86_64. 0.0-15.1.el6

 

Complete!

[Root @ rac2/] #

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.