Build a Yum server in Redhat5.4

Source: Internet
Author: User
1. Build a network yum server (accessible from the network) 1) install the FTP server yum server. [Root @ yum ~] # Mkdir/mnt/cdrom [root @ yum ~] # Mount/dev/cdrom/mnt/cdrom/[root @ yum ~] # Cd/mnt/cdrom/Server/[root @ yumServer] # rpm-ivhvsftpd-2.0.5-12.e

1. Build a network yum server (accessible from the Network)
1) install the FTP server yum server.
[Root @ yum ~] # Mkdir/mnt/cdrom

[Root @ yum ~] # Mount/dev/cdrom/mnt/cdrom/

[Root @ yum ~] # Cd/mnt/cdrom/Server/

[Root @ yum Server] # rpm-ivh vsftpd-2.0.5-12.el5.i386.rpm

[Root @ yum Server] # service vsftpd start

[Root @ yum Server] # cd/var/ftp

[Root @ yum ftp] # mkdir rhel

[Root @ yum ftp] # cp-ar/mnt/cdrom/*/var/ftp/rhel/

[Root @ junjie ftp] # du-sh rhel/

2) install the createrepo tool.
(Build group file, yum source uses database)

[Root @ yum ftp] # cd/var/ftp/rhel/Server/

[Root @ yum Server] # rpm-ivh createrepo-0.4.11-3.el5.noarch.rpm

[Root @ yum Server] createrepo-g./repodata/comps-rhel5-server-core.xml ./

[Root @ yum Server] # cd ../VT

[Root @ yum VT] # createrepo-g./repodata/comps-rhel5-vt.xml ./

[Root @ yum VT] # cd ../Cluster

[Root @ yum Cluster] # createrepo-g./repodata/comps-rhel5-cluster.xml ./

[Root @ yum Cluster] # cd ../ClusterStorage/

[Root @ yum ClusterStorage] # createrepo-g./repodata/comps-rhel5-cluster-st.xml ./

3) network yum client Configuration:
[Root @ yum ~] # Cd/etc/yum. repos. d/

[Root @ yum. repos. d] # vim myyum. repo

[Rhel-servr]

Name = Red Hat Enterprise Linux server

Baseurl = ftp: // 10.20.0.100/rhel/Server

Enabled = 1

Gpgcheck = 1

Gpgkey = ftp: // 10.20.0.100/rhel/RPM-GPG-KEY-RedHat-rel restart

[Rhel-vt]

Name = Red Hat Enterprise Linux vt

Baseurl = ftp: // 10.20.0.100/rhel/VT

Enabled = 1

Gpgcheck = 1

Gpgkey = ftp: // 10.20.0.100/rhel/RPM-GPG-KEY-redhat-rel restart

[Rhel-cluster]

Name = Red Hat Enterprise Linux cluster

Baseurl = ftp: // 10.20.0.100/rhel/Cluster

Enabled = 1

Gpgcheck = 1

Gpgkey = ftp: // 10.20.0.100/rhel/RPM-GPG-KEY-redhat-rel restart

[Rhel-clusterstorage]

Name = Red Hat Enterprise Linux clusterstorage

Baseurl = ftp: // 10.20.0.100/rhel/ClusterStorage

Enabled = 1

Gpgcheck = 1

Gpgkey = ftp: // 10.20.0.100/rhel/RPM-GPG-KEY-redhat-rel restart

[Root @ yum. repos. d] # yum list all // (add local cache)

In this case, you can use yum install to directly install the software. You can also use the image to install the software.

Yum [options] [command] [package...]

Yum install list update remove clean (clear cache)


We can see that yum can be used to install software through network ftp.

Use yum clean all to clear yum Cache

Yum clear all facilitates synchronization with software on the server

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.