Home > OS >  Rapid configuration yum local source
Rapid configuration yum local source

Time:11-18

first of all, the system mirror mount come over:

CD logo right here in the lower right corner, and then click connection, desktop icon will appear image,
And then the orders to create scripts to create script,
Vim rhel7. Repo. Sh
# in the open file add the following content:
#!/bin/bash

CD/etc/yum. Repos. D

The cat & gt; Rhel7. Repo & lt; [rhel7]
Name=rhel7
Baseurl=file:///media/cdrom
Enabled=1
Gpgcheck=0
OK

The mkdir -p/media/cdrom
Mount/dev/cdrom/media/cdrom
Echo "/dev/cdrom/media/cdrom either iso9660 defaults 0 0" & gt;> The/etc/fstab

Yum clean all
Yum makecache
after writing the script remember give script execute permissions:
Chmod 755 rhel7. Repo. Sh or chmod + x rhel7. Repo. Sh
give script execute permissions and then run the script:
Bash rhel7. Repo. Sh or./rhel7 repo. Sh
test:
[root @ localhost Desktop] # yum install - y HTTPD
The Loaded plugins: langpacks, product id, search - disabled - repos, subscription - manager
This system is not registered to Red Hat Subscription Management. You can use the Subscription - manager to register.
Resolving Dependencies
--> Running the transaction check
- & gt; Package HTTPD. X86_64 0-2. 4.6-40. El7 will be installed
--> Finished the Dependency Resolution

Dependencies Resolved

============================================================================================================
Package the Arch Version Repository Size
============================================================================================================
Installing:
HTTPD x86_64 2.4.6-40. El7 rhel7 1.2 M

The Transaction Summary
============================================================================================================
The Install Package 1

Total download size: 1.2 M
The Installed size: 3.7 M
Downloading packages:
Running the transaction check
Running the transaction test
The Transaction test succeeded
Running the transaction
Installing: HTTPD - 2.4.6-40. El7. 1/1 x86_64
Verifying: HTTPD - 2.4.6-40. El7. 1/1 x86_64

Installed:
HTTPD. X86_64 0-2. 4.6-40. El7

Complete!
summary
Finally a Complete! That HTTPD installation is successful, also demonstrated the yum configuration warehouse success!
Note: I use system is RedHat7, with other Linux system only need to change name, yum warehouse
in this paper, the original address: https://www.linuxprobe.com/quickly-configure-yum.html
  • Related