Yum Package Manager
Yum (full name Yellow Dog Updater, Modified) is a shell front-end package manager in Fedora and Redhat as well as SuSE and CentOS. Based on the RPM package management, can automatically download the RPM package from the specified server and install, can automatically handle dependencies, and install all the dependent software packages, without cumbersome to download, install
Yum source is divided into three kinds 1. local Yum Source 2. Network Yum source 3. Installation of additional software Yum
Case one, local yum configuration (take local CD-ROM for example)
1. Create mount point/mnt/cdrom
[ROOT@DG ~]# Mkdir/mnt/cdrom
[ROOT@DG ~]# Mount/dev/cdrom/mnt/cdrom Mount/dev/cdrom
Mount:block Device/dev/cdrom is write-protected, mounting read-only
[ROOT@DG ~]# Mount
/dev/sda2 on/type ext3 (rw)
Proc On/proc type proc (rw)
Sysfs On/sys type SYSFS (rw)
/DEV/SDA1 on/boot type ext3 (rw)
/DEV/HDC on/mnt/cdrom type iso9660 (RO)
2. Edit configuration file
[ROOT@DG ~]# Vi/etc/yum.repos.d/rhel-debuginfo.repo
[Rhel-debuginfo]
name=red Hat Enterprise Linux $releasever-$basearch-debug
baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/debuginfo/
Enabled=0
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
The modification becomes the following ↓↓↓
[Rhel-server]
name=red Hat Enterprise Linux Server
Baseurl=file:///mnt/cdrom/server
Enabled=1
Gpgcheck=1
Gpgkey=file:///mnt/cdrom/rpm-gpg-key-redhat-release
[Rhel-cluster] cluster is available, underlined below can not be configured
name=red Hat Enterprise Linux cluser
Baseurl=file:///mnt/cdrom/cluster
Enabled=1
Gpgcheck=1
Gpgkey=file:///mnt/cdrom/rpm-gpg-key-redhat-release
Profile Content Introduction:
[] Inside the warehouse name
Name Warehouse Description
BaseURL is the Yum source address, because the FTP is configured here, it can be http,file, etc.
Enabled to enable this warehouse, 1 is active, 0 is disabled
Gpgcheck Check the GPG signature (used to verify that the package to be installed is Redhat official)
The Gpgkey address requires the following command to enter this signature. To use this feature
3. Installing the HTTP service with a local source
[ROOT@DG ~]# yum install http–y default installation dependency pack
4. To view a program installed with Yum
[ROOT@DG ~]# Yum List installed
[ROOT@DG ~]# yum list installed |grep httpd
Failed to set locale, defaulting to C
This system is not registered with RHN.
RHN support would be disabled.
Httpd.i386 2.2.3-22.el5 Installed
can see our HTTP
Case two. The preparation of Yum network source
This case is an example of an FTP server, or you can use a different server
The topology map is as follows:
The server configuration is as follows:
1. Create mount points and mount
[ROOT@DG ~]# Mkdir/mnt/cdrom
[ROOT@DG ~]# Mount/dev/cdrom/mnt/cdrom
Mount:block Device/dev/cdrom is write-protected, mounting read-only
2. Install FTP server
[ROOT@DG server]# RPM-IVH vsftpd-2.0.5-16.el5.i386.rpm
3. Start the FTP service
[root@localhost ~] #service vsftpd Restart
4. Create a DG directory under/var/ftp/and copy the relevant files into this directory
[ROOT@DG dg]# cp-rf/mnt/cdrom/*./Take a long time, wait patiently
The client configuration is as follows:
5. Copy configuration file to DG1 and configure
[root@dg~] #cp/etc/yum.repos.d/rhel-debuginfo.repo/etc/yum.repos.d/dg1.repo
[ROOT@DG ~]# Vi/etc/yum.repos.d/dg1.repo
Modified to read as follows:
[RHEL-FTPA]
Name=ftp
IP address of the baseurl=ftp://192.168.1.25/dg/server/server
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release
The verification is as follows:
[Root@dg ~]# Yum Clean all
Loaded Plugins:rhnplugin, security
Cleaning up Everything
[Root@dg ~]# Yum Update
Loaded Plugins:rhnplugin, security
This system is not registered with RHN.
RHN support would be disabled.
RHEL-FTPA | 1.3 KB 00:00
Rhel-ftpa/primary | 732 KB 00:00
RHEL-FTPA 2292/2292
Skipping security plugin, no data
Setting up Update Process
Note: The client may not be able to access the firewall if it is to be turned off.
This case server is VM under the Redhat virtual machine, you can modify the network card for bridging mode, the same LAN can be verified.
Case three, Yum Source extensions (for additional packages)
This case takes the installation linuxqq as an example
1. This is the same as the previous build mount.
2. Copy the required files to the Yum/ROOT/DG Warehouse (catalog is Custom)
[ROOT@DG dg]# cp-rf/mnt/cdrom/*./Take a long time
3. Switch to the/root/dg/server directory to install the Createrepo tool
[ROOT@DG server]# ll createrepo*
-r--r--r--451 root root 60901 2008-04-21 createrepo-0.4.11-3.el5.noarch.rpm
[ROOT@DG server]# RPM-IVH createrepo-0.4.11-3.el5.noarch.rpm
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/