Yum repository by installing the application of the underlying operating Liunx

Daily work, Liunx package to install the operating system used by the application usually rpm, deb package format or use the source code and install it from the yum repository.
Where there are more rpm, yum packages and source code libraries are installed.
rpm package is similar to the Windows installation program, a key installation, is relatively simple.
Sources Package higher degree of flexibility can be custom-tailored to the content, but a higher threshold to get started, not just be suitable for novice learning.
So this blog on the main method to install the yum detailed explanation.

So, what is yum?
Yum (called the Yellow dog Updater, Modified) is a front end package manager Shell Fedora and RedHat and CentOS in. RPM-based package management, can automatically download from the specified server RPM package and installed, you can automatically handle dependencies, and install all packages depending on, again and again without the cumbersome download and installation.
In simple terms, yum similar to a warehouse, we are required to install the package to extract from this warehouse.
Contents:
1, installed by Yum online httpd
2, mount the mirror on their own, establish Yum offline library, and complete the installation of httpd

First, by Yum-line installation httpd
1, preliminary environmental confirm
(this experiment all Liunx environments are established in a virtual machine) connected Liunx system has been opened by Xshell

Enter "ifconfig" View card information, make sure you have the normal Internet ip address

2, connected online library Yum
input "yum list" to get the online library yum, yum repository provided by the government, which can ensure the update package. Online yum repository is very large, you can filter out the relevant software packages required for experiments by the grep command.

3, download and complete the installation http services
input "yum install httpd * -y" wait for the installation to complete. (If you use rpm to install, but also consider the associated rely relations)

This completes the installation of httpd application, practical use because you do not consider dependencies should be simpler than rpm.
Second, mount the mirror on their own, establish offline Yum repository
updates yum though through online libraries to install the application is very convenient and also to ensure the software, but there is a very important prerequisite - that is networking. Once there is no network, you can not use the online library of yum, so can you build an offline, in local yum repository it?
Mirror yes, the answer to the mounting system contains a large number of commonly used software package, although it can not guarantee the update, but at least it will not affect the normal work when off the network. The following will explain in detail how to set up offline yum repository and install httpd application.
1, the optical disk mounted in the directory in the image
because of this experiment using a virtual machine Liunx system, so long as the image can be placed in the virtual drive in the

Use Xshell remote connection, and enter "df -h" See mount case, the mount point under normal conditions should be corresponding to the drive

The next step was to mount the operation, enter "mount / dev / sr0 / mnt /" (can be any empty directory, do not deliberately use the / mnt directory) to mount the mirror, then enter "df -h" to view it confirm mount complete the next step.

2, in order to simulate the actual situation broken network, only the virtual machine to host mode, and enter "vim / etc / sysconfig / network-scripts / ifcfg-ens33" to set a static IP host is provided as FIG. After completing the setup enter ": wq", then enter "service network restart" to restart the network service

3, the next step is to establish the process offline yum repository, first jump to the next "/etc/yum.repos.d" directory, files in that directory are yum online library, it can not be used offline. However, do not delete (deleted, restored after the network zezheng), under the directory of all the files into the new "bak" folder to back up. Then enter "vim lixian.repo" into the new file

4, the "lixian.repo" Press Enter FIG.

5, Enter: "wq" Save, enter "yum list" to enable offline yum repository

6, the next step is completely yum online reference library, type "yum install httpd * -y" can, after the installation is complete, enter "rpm -q httpd" to check whether the installation was successful.

Guess you like

Origin blog.51cto.com/14484404/2430562