In the maintenance of Linux systems, the dependency between Linux packages is a very headache. For example, if you want to install package A, but you are prompted to install package B before installing A, and when you install package B, you are prompted to install C library &hellip first; In order to solve this problem, We have to use the yum (Yellow dog Updater, Modified) tool under Linxu. The yum tool can automatically install dependent packages based on various header information of the rpm package in the repository, and resolve dependencies. It is very convenient to use yum to add/delete/change rpm packages under linux!
The following is a simple yum configuration and usage process for Linux: 1. Experimental environment Operating system
: Red Hat Enterprise Linux AS 5 kernel version: 2.6.18-8.el5 CPU architecture: I386 SMP accessory software: Red Hat Enterprise Linux AS 5 DVD ISO file
2. Install yum under linux and build repository (software repository) # mount rhel 5.0 dvd iso file mkdir -p /under linux system Mnt/iso mount -o loop /opt/rhel5.0.iso /mnt/iso
#Install yum in linux system, createrepo package rpm -ivh /mnt/ISO/Server/yum-3.0.1 -5.el5.noarch.rpm rpm -ivh /mnt/ISO/Server/yum-metadata-parser-1.0-8.fc6.i386.rpm rpm -ivh /mnt/ISO/Server/yum-rhn-plugin-0.4 .3-1.el5.noarch.rpm rpm -ivh /mnt/ISO/Server/yum-updatesd-3.0.1-5.el5.noarch.rpm rpm -ivh /mnt/ISO/Server/createrepo-0.4.4 -2.fc6.noarch.rpm
#Copy the files in the mounted iso to /opt/rhel5.0 directory mkdir /opt/rhel5.0 cp -R /mnt/ISO/* /Opt/rhel5.0
#Regenerate the repository (software repository) related files. The generated files are in the folder under the “repodata” folder in the current directory. Cd /opt/rhel5.0/Server/rm -rf repodata createrepo -g /mnt/ISO/Server/repodata/comps-rhel5-server-core.xml ./
3. Configure yum in linux In the /etc/yum.repos.d/directory, create a configuration file with a .repo suffix, such as: rhel_yum.repo (other files in this directory can be deleted), and the contents of rhel_yum.repo are as follows: http://www.aiezu.com/[Server] name=Server baseurl=file:///opt/rhel5.0/Server/#Note baseurl points to our repository(software repository)/opt/rhel5.0/Server directory enable= 1 gpgcheck=0
This article comes from: http://www.aiezu.com/4. Test rhel5.0 yum# under linux clear yum settings cache yum clean all
#View Installed and uninstalled package group yum grouplist
#Install Web Server package group yum groupinstall "Web Server"
#View group information yum groupinfo "Web Server" From: http://www.aiezu.com/#delete"MySQL Database" yum groupremove "MySQL Database"
#Upgrade"MySQL Database" yum groupupdate "MySQL Database"
5. lin Common problems with ux installation under ux
1. Q: Why do I need to copy the files in the mounted ISO image to the local disk instead of directly in the mounted iso file system? A: Because we have to regenerate the relevant configuration file of the repository, and the mounted iso file system is not writable, it must be copied to the local disk. 2. Q: When we configure it, execute "yum groupinstall 'MySQL Database' " The following error is reported during installation. What is going on? Yum groupinstall "MySQL Database" Loading "installonlyn" plugin Loading "rhnplugin" plugin This system is not registered with RHN. RHN support will be disabled. Setting up Group Process This article is from: http://www.aiezu.com /Setting up repositories Setting up repositories Reading repository metadata in from local files primary.xml.gz 100% |
==========================
663 kB 00:00 ################################################################# ##### 2113/2113 Resolving Dependencies –> Populating transaction set with selected packages. Please wait. —> Downloading header for mysql to pack into transaction set. media://1170972069.396645%232/mysql-5.0. 22-2.1.i386.rpm: [Errno 4] IOError: This article is from: http://www.aiezu.com/<urlopen error unknown url type: media> Trying other mirror. Error: failed to retrieve mysql-5.0 .22-2.1.i386.rpm from s error was [Errno 4] IOError: <urlopen error unknown url type: media>
A:Please confirm "/etc/yum.repos.d/rhel_yum The "baseurl" in the .repo" file points not to the mounted iso file system path, but to the local disk file system path, the third line in the third step of this article. And make sure that the ninth line of the second step is used to regenerate the repository configuration file. In fact, "media://1170972069.396645#1" is the configuration value of the Server/repodata/repomd.xml file in rhel 5.0 dvd iso. This article is from: http://www.aiezu.com/3. Q: Why didn't I list any package group information after I executed the "yum grouplist" command? As follows: #yum grouplist Loading "installonlyn" plugin Loading "rhnplugin" plugin This system is not registered with RHN. RHN support will be disabled. Setting up Group Process Setting up repositories Server 100% |
==========================
951 B 00:00 Done
A: Please make sure that the createrepo command is executed to regenerate the repository configuration file, and the command has the "-g" option, as shown in line 19 of the second step. The "Server/repodata/comps-rhel5-serer-core.xml" in rhel 5.0 dvd iso contains the grouping information of the rpm package. This article comes from: http://www.aiezu.com/
Okay, Linux uses Yum to manage local software packages and writes this. Any questions, please feel free to leave a message.
With the increasing use of Linux, there are a large number of network servers using the Linux operat
This article describes the solution when encountering is not in the sudoers file during Linux use. W
A few days ago, I met a friend on QQ and asked for help. I said that the VPS I bought could not sta
under RedHat Enterprise Linux server 5.4 First, system environment operating system: RedHat Enterp
Display all process commands in linux
Red Hat 9.0 configures the Xmanager
Linux file copy, delete and move commands
Linux sort command parameters and usage details
Monitor website logs under Linux command line
Tutorial to turn off SELinux features in Linux
How to Manage KVM Virtual Environments with Command Line Tools in Linux
Linux common compression decompression command set
How to disable the modification of LAN IP address under Windows system
Win10 system IE can not use the solution
Using a USB flash drive to encrypt the system
Windows 8 system will be the top ten reasons for the winner
Xbox can't log in error 0x800488AB solution
Clear personal use records Protect privacy from being snooped
Win7 user account automatic login method summary
Win7 computer how to set automatic replacement wallpaper theme