The Red Hat yum package management system appears to solve the dependency between RHEL5 and RHEL6 local and network yum source creation, and to facilitate and quickly install rpm, after yum is configured, you can use the add/delete program in the graphic interface to install and delete the software! L mount a CD or iso image to create a local yum source; l install vsftp, http, and so on to implement network y
The Red Hat yum package management system appears to solve the dependency between RHEL5 and RHEL6 local and network yum source creation, and to facilitate and quickly install rpm, after yum is configured, you can use the add/delete program in the graphic interface to install and delete the software!
L mount a CD or iso image to create a local yum source;
L install vsftp and http to implement the network yum source
L note that the repo configuration file in RHEL5 can be copied and modified. the repo template file does not exist in RHEL6.0 and needs to be manually created.
L common yum commands
Yum clean all
Yum search dhcp
Yum list
Yum grouplist
Yum groupinstall
Yum updage dhcp
Yum remove dhcp
Yum-y install dhcp
1. use the CD to create a local yum source
1. # mount/dev/cdrom/media to mount the local disc
# Mount-o loop/public/soft/rhel5-4.iso/media or mount an iso image
2. create a yum repository
The yum repository suffix is repo, and the yum source configuration must be a suffix,
Copy the default yum template configuration file, which is the same as the configuration in rhel6.
# Cd/etc/yum. repos. d
# Cp rhel-souce.repo yum. repo
3. modify the yum configuration file yum. repo.
[Yum] source name
Name = The name of the yum source. Note that
Baseurl = file: // media/Server local Source file: // the third bar indicates the local root directory
Enabled = 0/1 disable yum source 0 and enable security verification 1
Gpgcheck = 0/1 disable security verification 0, enable security verification 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release security check, check whether the rpm package of this yum source is a red hat official package that imports gpgkey: rpm -- import RPM-GPG-KEY-redhat-release
2. manually create a yum source and manually create a repo database
1. # mount/dev/cdrom/media to mount the local disc
# Mount-o loop/public/soft/rhel5-4.iso/media or mount an iso image
# Cd/media/Server
# Rpm-ivh createrepo-0.4.11-3.el5.noarch.rpm install the createrepo tool
2. create a yum repository
# Cd/etc/yum. repos. d
# Cp rhel-souce.repo yum. repo
3. copy some rpm packages to the created warehouse directory and create a repo database file using the createrepo tool.
# Cd/public
# Createrepo/public/yum/
# Cd repodata/We can see that the repodata database file is generated under the repository directory,
# Ls then this repository takes effect. Note that! The official CD has been created
Filelists.xml.gz other.xml.gz primary.xml.gz repomd. xml repodata database! Therefore, you do not need to create
4. configure the yum repository file
[Yum]
Name = yum
Baseurl = file: // public/test
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
III. network yum source, taking ftp as an example
1. install vsftp to create a local ftp server, which can be accessed anonymously by default.
# Yum-y install vsftp
# Service vsftpd restart
# Lftp 192.168.18.3
Lftp 192.168.18.3: ~> Dir
Drwxr-xr-x 2 0 0 4096 Jan 02 20:59 pub
2. # mkdir/var/ftp/pub/yum vsftp default anonymous access directory/var/ftp/pub
# Cp/media/Server/*/var/ftp/pub/yum/copy all rpm packages to the repository path
3. repo repository configuration file
[Rhel]
Name = rhel
Baseurl = ftp: // 192.168.18.3/pub/yum
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release