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