Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Quickly configure yum local sources

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This document will teach you how to quickly configure yum sources, a method that works well for newly created Linux systems, especially RHEL7 series Linux systems. First, mount the system image:

Right-click on the CD logo in the lower right corner, and then click Connect. The mirror icon will appear on the desktop.

Then execute the Create Script command Create Script.

vim rhel7.repo.sh #Add the following to the open file: #!/ bin/bashcd /etc/yum.repos.dcat > rhel7.repo /etc/fstabyum clean allyum makecache After writing the script, remember to give the script execution permission: chmod 755 rhel7.repo.sh or chmod +x rhel7.repo.sh Give the script execution permission and then run the script: bash rhel7.repo.sh or./ rhel7.repo.sh Test: [root@localhost Desktop]# yum install -y httpdLoaded plugins: langpacks, product-id, search-disabled-repos, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Resolving Dependencies--> Running transaction check---> Package httpd.x86_64 0:2.4.6-40.el7 will be installed--> Finished Dependency ResolutionDependencies Resolved============================================================================================================ Package Arch Version Repository Size============================================================================================================Installing: httpd x86_64 2.4.6-40.el7 rhel7 1.2 MTransaction Summary============================================================================================================Install 1 PackageTotal download size: 1.2 MInstalled size: 3.7 MDownloading packages:Running transaction checkRunning transaction testTransaction test succeededRunning transaction Installing : httpd-2.4.6-40.el7.x86_64 1/1 Verifying : httpd-2.4.6-40.el7.x86_64 1/1 Installed: httpd.x86_64 0:2.4.6-40.el7 Complete! summary

Finally complete! This means that httpd was successfully installed, and it also means that yum repository configuration was successful!

Note: I am using RedHat7 system, with other Linux systems, then just need to change the yum repository name.

Original address of this article: https://www.linuxprobe.com/quickly-configure-yum.html Editor: Chuanqi, Auditor: Pang Zengbao

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report