In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "RHEL7.1 how to configure yum source", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "RHEL7.1 how to configure yum source" this article.
When it comes to the yum source, we must talk about the unique dependency problem in the linux system. Yum exists to solve the dependency. The yum source is equivalent to a directory item. When we use the yum mechanism to install the software, if we need to install the dependent software, the yum mechanism will find the dependent software according to the path defined in the yum source, and install the dependent software.
How the 1.yum source works
YUM is the abbreviation of "Yellow dog Update, Modified", is a package manager, because the Linux system has a unique dependency, YUM exists to solve the dependency, YUM source is quite a directory, when we need to install dependent software, YUM automatically downloads the RPM package from the specified place and installs, which can solve the dependency problem very well.
The basic working mechanism of YUM: all RPM software packages are stored on the server, and then the dependency relationship of each RPM file is analyzed with related functions, and the data is recorded as a file and stored in a specific directory of the server. If the client needs to install some software, download the dependency relationship file recorded on the server first (you can use www through FTP) Through the analysis of the recorded data downloaded by the server, all the relevant software is obtained and downloaded at one time for installation.
two。 How to install software yum list all # # list all security subpackages yum list installed # # list installed yum list available # list uninstalled yum remove software # # uninstall software yum install software # # install software yum search keyword # search for software yum whatprovides files related to keywords # search for the package containing this file yum reinstall software # install the software from the newly installed software yum localinstall third-party software # # install the software and resolve dependencies yum info software # query the software information yum groups list # list the software group yum groups install # install group yum groups remove # uninstall group yum groups info # Establishment of 3.RHEL official software repository for viewing group information
3.1 download the image
To establish an official software repository, you need an image that matches the local machine. The host of the experiment is rhel7.1, so the image is also this version.
3.2 Mount the image
Hang the image in a directory, and df can check whether the mount is successful.
3.3 Editing the profile
Path: / etc/yum.repos.d/rhel-dvd.repo file, the system will only read files ending with .repo. The name does not matter. Gpgcheck=0 does not do gpg detection. Gpg detection uses yum installation software to verify the software input public key to see if the source is secure. Baseurl is to specify the path to find and resolve dependency software, because this is a local yum configuration. So using "file://", / yum" is the mount point of the image just now.
3.4 refresh the cache
Yum clean all
Make the configuration effective.
4. Configuration of network yum source
Configure the network yum source so that the yum repository we built can be shared on the network, either based on httpd services or based on ftp services. The httpd service is used here, and httpd is the Apache hypertext transfer protocol.
4.1 install softwar
Yum install httpd-y
First install the httpd software that provides http services, or you can verify that the local yum source configuration was successful. The installation was successful and the local yum source was configured correctly.
4.2 configure the service environment
Turn on the httpd service, boot the service from the east, and turn off the firewall.
4.3 create a directory and mount the image
The default release directory for Httpd is / var/www/html/, which is the equivalent of the root directory, where all shared files are placed. You can see line 119 in the / etc/httpd/conf/httpd.conf file. Create a directory in the "root" directory, uninstall the / yum/, and then mount the image to the created directory.
4.4 Editing the profile
Vim / etc/yum.repos.d/rhel-dvd.repo
Yum clean all then cleans up the cache to make the configuration effective.
4.5 automatically mount the image when booting
By automatically mounting the image on boot, we can install the updated software directly each time we boot, and automatically share the yum repository, adding a line of commands at the end of the / etc/fstab file. Later, when we restart, the system opens the opportunity to read the / etc/fstab file, help us mount the image, and we can do it once and for all.
4.6 verify the configuration
Open the browser, type 172.25.98.250/yumsource, and you can see the network yum source that we configured.
5.yum Software controls vim / etc/yum.conf
Add the following command to allow search software to filter automatically.
Exclude=*.x86_64 # ignore 64-bit installation package exclude=*.i686 # ignore 32-bit installation package 6.rpm command
When the software we want to install is not in the official image, we need to download a rpm package online.
Rpm # underlying software management tool-I # install-v # # display information-h # specify the decryption method of the package as hash-Q # query-p # specify the name of the software package itself-l # list the names of the files in the software-scripts # view the actions performed during the installation and uninstallation of the software Do-f # query which installation package a file belongs to-a # all-e # Uninstall-force # Force-- nodeps # ignore dependencies-c # configuration file rpm2cpio software name | cpio-id # disassemble the package by directory
Install wps:
Rpm-ihp wps-office-10.1.0.5672-1.a21.x86_64.rpm
If there are some dependencies, just find a software installation that provides these dependencies, or build a third-party software repository, which will automatically help us install the dependencies.
7. Build a third-party software repository
Put all rpm packages in a specified directory, such as / software
Detailed explanation of RHEL7.1 yum source configuration and software installation RHEL7.1 yum source configuration and software installation
7.2 generate the repodate directory
When createrepo / software # # is executed in the established warehouse directory, a repodate directory will be generated to explain RHEL7.1 yum source configuration and software installation in detail. RHEL7.1 yum source configuration and software installation will be generated.
7.3 Edit configuration file
Write the yum source for the specified / software in / etc/yum.repos.d/xxx.repo.
7.4 make the configuration effective
Clean the cache to make the configuration effective.
Yum repolist all # # list warehouses
You can see two "warehouses", one is the official warehouse built by the image, and the other is the third-party warehouse.
After building the third-party software repository, it will automatically help us to solve the dependency problem when installing the warehouse software with yum.
These are all the contents of the article "how to configure yum feeds for RHEL7.1". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.