Redhat build YUM service (ftp-based)

Source: Internet
Author: User
After the redhat system was reinstalled today, when installing apache, I encountered the noacceptableCcompilerfoundin $ PATH error. I found some information from the Internet and asked me not to install gcc or other compilers. for convenience and convenience, we recommend that you use the yum service to learn more from the internet...

 

After the redhat system was reinstalled today, when installing apache, I encountered the no acceptable C compiler found in $ PATH error. I found some information from the Internet and asked me not to install gcc or other compilers, we recommend that you use the yum service for convenience and convenience. I will not go into details about the YUM service from the internet. you can refer to Baidu for more information; YUM is mainly used to automatically upgrade, install, and remove rpm packages. it can automatically find and solve the dependency between rpm packages, without the need for our administrators to install each package one by one, this saves our administrators a lot of time .. Haha ..

The yum package system is installed by default... View commands

[Root @ learn ~] # Rpm-qa | grep yum

Yum-metadata-parser-1.0-8.fc6

Yum-3.0.1-5.el5

Yum-rhn-plugin-0.4.3-1.el5

Yum-updatesd-3.0.1-5.el5

Next we will describe how to build the local source. the following method is to find some materials and their own practices. we will also write some experiences and hope they can help you;

Here, the software library is composed of the DVD package that comes with RHEL5. combined with the VSFTPD service, the simple YUM source based on ftp is provided, which is simple but practical;

The procedure is as follows:

1. install the vsftpd package and the createrpro package

I will not explain the purpose of installing the vsftpd package .. Is ftp service?

The createrpro tool is mainly used to collect the big information of the rpm Package File header to create the repodata software library data (it is an xml file compressed by gaip)

First, create a directory, media/cdrom directory, and mount it to the package. Command: mount/dev/cdrom/media/cdrom/

Then install the vsftpd and creatrepo packages.

RPMs-ivh/media/cdrom/Server/vsftpd-2.0.5-10.el5.i386.rpm

Warning:/media/cdrom/Server/vsftpd-2.0.5-10.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186

Preparing... ######################################## ### [100%]

Package vsftpd-2.0.5-10.el5 is already installed

[Root @ learn ~] # Rpm-ivh/media/cdrom/Server/createrepo-0.4.4-2.fc6.noarch.rpm

2. prepare the software library directory and put it in/var/ftp/rhel5 (new directory)

Put the package under/media/cdrom/under/rhel5/to enable user access. this is in the ftp path.

Cp-prf/media/cdrom/*/var/ftp/rhel5/

3. create an information file for the repository software library

Createrepo-g repodata/comps-rhel5-cluster.xml ./

Cd ../ClusterStorage/

Createrepo-g repodata/comps-rhel5-cluster-st.xml ./

Cd ../Server/

Createrepo-g repodata/comps-rhel5-server-core.xml ./

Cd ../VT/

Createrepo-g repodata/comps-rhel5-vt.xml ./

Rm-rf/var/ftp/rhel5/*. olddata/this is to clear old data

4. enable the vsftpd service

[Root @ learn ~] # Service vsftpd restart

\ Disable vsftpd: [OK]

Start vsftpd for vsftpd: [OK] if it cannot be started, check the configuration file of your vsftpd. conf.

5. set the YUM source location

Before using YUM, you must create a specified configuration file for the client and set the location of the source file and available directories.

[Root @ learn ~] # Cd/etc/yum. repos. d/

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

Rhel5-pkgs-yumser.repo this file is defined by yourself

Edit this file

 

 

 

[Cluster]

Name = cluster directory

Baseurl = ftp: // 172.16.17.120/rhel5/Cluster

Enabled = 1

Gpgcheck = 0

[ClusterStorage]

Name = clusterStorage directory

Baseurl = ftp: // 172.16.17.120/rhel5/ClusterStorage

Enabled = 1

Gpgcheck = 0

[Server]

Name = Server directory

Baseurl = ftp: // 172.16.17.120/rhel5/Server

Enabled = 1

Gpgcheck = 0

[VT]

Name = VT directory

Baseurl = ftp: // 172.16.17.120/rhel5/VT

Enabled = 1

Gpgcheck = 0

 

Save, exit, and OK

Run the command: yum clean all indicates updating the cache.

Common yum commands

Yum list updates View packages that can be upgraded

Yum list installed

Yum install package name installation × package

Then confirm by "Y"

In this case .... YUM source is built. OK ,,

Application ::;

[Root @ learn mysql-5.0.56] # yum-y install ncurses-devel

Loading "rhnplugin" plugin

Loading "installonlyn" plugin

This system is not registered with RHN.

RHN support will be disabled.

Setting up Install Process

Setting up repositories

Cluster 100% | =================================| 1.1 kB

ClusterStorage 100% | ===========================| 1.1 kB

VT 100% | =======================| 1.1 kB

Server 100% | =================================| 1.1 kB

Reading repository metadata in from local files

Parsing package install arguments

Resolving Dependencies

--> Populating transaction set with selected packages. Please wait.

---> Downloading header for ncurses-devel to pack into transaction set.

Ncurses-devel-5.5-24.2006 100% | =================================| 98 kB

---> Package ncurses-devel.i386. 5-24.20060715 set to be updated

--> Running transaction check

 

Dependencies Resolved

 

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

Package Arch Version Repository Size

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

Installing:

Ncurses-devel i386 5.5-24.20060715 Server 1.6 M

 

Transaction Summary

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

Install 1 Package (s)

Update 0 Package (s)

Remove 0 Package (s)

 

Total download size: 1.6 M

Downloading Packages:

(1/1): ncurses-devel-5.5-100% | = | 1.6 MB

Running Transaction Test

Warning: ncurses-devel-5.5-24.20060715: Header V3 DSA signature: NOKEY, key ID 37017186

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: ncurses-devel ######################### [1, 1/1]

 

Installed: ncurses-devel.i386. 5-24.20060715

Complete!

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.