In RHEL5, configure the YUM server and client-Linux Enterprise Application-Linux server application information. The following is a detailed description. Before talking about YUM, let's take a look at what RPM is? RPM is the abbreviation of RedHat Package Manager. As the name suggests, the software management program was developed by Red Hat, and of course there are many similar software management programs. However, RPM is easy to use, so it has become the most popular software management program.
RPM is a set of management programs that install the required software to the Linux system in a database record manner. The biggest feature is that the software to be installed is compiled first (if needed) and packaged, and pre-configured database records in the packaged software are used, record the other software that must be installed when the software is to be installed. When the software is installed in Linux, based on the data recorded in the software, RPM first queries whether other software on Linux is satisfied. If yes, It is installed. If not, it is not installed.
The biggest problem with the RPM package installer is that, since the RPM program is packaged data, that is, the data in it has been compiled, during installation, you must first install the host environment. The installation environment for this software must also appear on the current host. If you have experience installing RPM, It is a headache. YUM can solve this problem well.
YUM is Yellow dog Updater, short for Modified. It is a plan initiated by Duke University to solve the problem of RPM dependency, it is convenient for users to install and upgrade software. It is particularly noted that YUM is only used to solve RPM dependency problems, rather than other software installation modes. Of course, in addition to YUM, we can also implement APT (Advanced Package Tool, a software management Tool developed by debian ).
In fact, the operating principle of YUM is not complex. The dependency between the software is recorded in the header of each RPM software. If you can record the content of this header and analyze it, you can know which basic software needs to be installed before each software is installed. That is to say, on the server, analyze all RPM files with an analysis tool, and then record the analysis as long as the files recorded are queried during installation or upgrade, all associated software can be known. The basic workflow of YUM is as follows:
Server: stores all RPM software packages on the server, and analyzes the dependency between each RPM file with relevant functions, record the data into files stored in a specific directory on the server.
Client: If you need to install a software, download the dependency file recorded on the server (via WWW or FTP) and analyze the record data downloaded from the server, then obtain all the relevant software and download it all at a time for installation.
After RHEL 5 is installed, when "Applications à Add/Remove Software" is opened in GNOME, for example, why cannot it be used? No, because only the normally configured YUM client can install the software here.
The following describes how to configure the YUM server and client respectively.
1. Configure the YUM server.
1. Install the vsftpd service and configure it to automatically start (in addition to using chkconfig vsftpd on, you can also directly use chkconfig vsftpd on ).
2. Copy the Server, VT, Cluster, and ClusterStorage directories in RHEL 5 to/var/ftp/pub. (If you do not use virtualization or the three directories after the Cluster, do not copy them ).
3. confirm that the yum (installed by default in RHEL 5) and createrepo (used to generate rpm dependencies and group information) packages are installed in the system.
2. Create group files
In RHEL 5, the repodata directory under each directory has a repomd. xml, the file records the rpm package dependency, there is a comps-rhel5 -*. xml file, which records the group information. When creating a yum repository, You need to recreate the file. The directories to be rebuilt include:
The reconstruction command is as follows:
①: Indicates the command used for reconstruction. The absolute path must be written here.
②: This is a Bug of this command.
③: Manually delete the directory.
4. Run the command again.
3. Configure the YUM client.
1. define the yum client library file (/etc/yum. repos. d/rhel-debuginfo.repo) copy a copy (name arbitrary, but must be. the end of the repo.) modify the bashurl and name.
2. Clear yum Cache
4. Common commands on the YUM client.
Yum install [-y] package
Install a specified package through the yum Server
●-Y: You are not prompted to confirm direct installation.
Yum localinstall rpmfile
Differences between install and localinstall: install the specified package and all dependencies directly through the yum server, while localinstall is a local rpm file, as long as the dependency is installed on the yum server.
Yum grouplist
Display All yum server-defined groups
Yum groupinstall packagegroup
One-time installation of a group of packages defined on the yum Server
Yum remove [-y] package
Install a specified package through the yum Server
●-Y: the user is not prompted to delete the file directly.
Yum groupremove packagegroup
Deletes a group of packages defined on the yum server at one time.
Yum list [all]
List all available packages of the yum Server
Yum info package
Display specified package information
Yum groupinfo grouppackgroup
Displays the information of a specified group.
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