In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to configure the network yum source in the Linux system, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.
Introduction to YUM: Yellow dog Updater, Modified, developed by the Duke University team, modified Yellow Dog Linux's Yellow Dog Updater, is a character front-end package manager based on RPM package management.
Can automatically download and install RPM packages from designated servers, handle dependencies, and install all dependent packages at once without tedious downloading and installation.
Adopted by Yellow Dog Linux itself, as well as Fedora and Red Hat Enterprise Linux.
Package sources: packages available for download by Yum include packages from Fedora itself and packages from unofficial software repositories such as rpmfusion, all maintained by the Linux community and basically free software.
All packages have a separate GPG signature, mainly for the user's system security. For Fedora core 4 and later users, signatures from the new software repository are automatically imported and installed.
Configure the local yum source configure the local yum source is mounted to the system through the local mapping CD, and then point the baseurl in the yum configuration file to the mounted directory.
First, in this configuration of the virtual machine, check the use iso mapping file, and then select the location where our iso file is located.
In the virtual machine system, our iso file is a / dev/sr0 device, and our iso file will be mounted to the / run/media/$username/ directory by default. But now we're going to mount the iso file under / mnt/cdrom. If there is no cdrom in the mnt directory, we will create a new one ourselves.
There are two ways to mount
One: one-time mount, invalidation after rebooting the system
Mount / dev/sr0 / mnt/cdrom
Two: permanent mounting
The mount information for our device is in / etc/fstab, so we need to modify the fstab file in order to mount it permanently. When we open the file with vim, we can see that there are three lines of information, which is the mount information of other partitions, so we now need to add the mount information of our CD.
Add the following mount information to our CD.
/ dev/sr0 / mnt/cdrom iso9660 defaults 0 0
After adding, save and exit.
Then execute mount-a. This command means to mount all file systems in the fstab file. As you can see, we have already mounted it.
After mounting the iso file, we modify the source configuration file / etc/yum.repos.d/, which has a file by default, which we delete, and then create our own file that ends in .repo and open it with a vim editor. Enter the following configuration and save it.
[name] # the name in parentheses is the warehouse source name, usually letters and numbers. You must enter the description of yum in name=my new repo #. Write or not write baseurl= file:///mnt/cdrom # baseurl to indicate the path of rpm packages that can be managed and used by yum. You must enter enabled=1 # enabled to indicate whether the current warehouse is open, 1 is open, 0 is closed. If this option is left on by default, gpgcheck=0 # gpgcheck means whether to install the rpm package based on the security information of the matching package based on the public and private keys. 1 means to enable it, and # 0 means to disable it. If this option is left empty, the default is to verify and then perform yum clean all to clear the cache information.
Yum list | wc-l statistics lists the number of all packages. If so, the yum source configuration is complete. You can see that there are 4405 bags here.
Configure the network yum source because the update package of Red Hat Enterprise Linux7 is only valid for registered users, so you need to manually change it to the update package of Centos. Centos is almost the same as Redhat, so there is no need to worry about the compatibility of the software package.
First of all, take a look at the yum package installed on the redhat7 system itself. Redhat itself has installed six packages about yum, and we need to uninstall it!
Rpm-qa | grep yum
Instructions for uninstalling these packages
Rpm-qa | grep yum | xargs rpm-e-- nodeps # uninstall directly without checking for dependencies
Then reinstall centos's yum package, put the package in a unified folder, and then install it. After installation, you can see that the centos installation package has been installed. Here I see that the links to centos's yum installation packages given by many other people's tutorials are not available, and then I went to foreign websites to find several available installation packages.
Link: https://pan.baidu.com/s/10IrBjM5j_TJT0Qc2aW64Cg extraction code: i4pe
Rpm-ivh * # install all rpm packages rpm-qa in this directory | grep yum # query whether it is installed
After installing the yum package for centos, you can modify the file under / etc/yum.repos.d/, which is the same as configuring the local yum source modification
[base] after configuring the name= yum repo baseurl= http://mirrors.aliyun.com/centos/7/os/$basearch/ enabled=1 gpgcheck=0 to save and exit, clear the yum cache to see how many packages are in the yum. You can see that there are 11056 here, which is much more than the 4, 000-plus local yum source!
After reading the above, do you have any further understanding of how to configure the network yum source in the Linux system? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.