1. to upload an iso file to/usr/local/src, make sure that the ISO file is uploaded before performing the following operations. 2. create Mount directory mkdir/media/CentOS73. Mount iso file mount-tiso9660-oloop/usr/local/src/CentOS-7-x8 1. Upload iso file to/usr/local/src
Make sure that the following operations are performed after the ISO file is uploaded. 2. create the Mount directory mkdir/media/CentOS7
3. mount the iso file mount-t iso9660-o loop/usr/local/src/CentOS-7-x86_64-Everything-1503-01.iso/media/CentOS7
4. set the automatic mounting of the CD image at startup
Run vi/etc/fstab
(If fstab is entered incorrectly, the host cannot be started normally and enters the emergency mode emergency state ,)
Add the last line (press I to enter edit mode, press ESC to exit edit mode, and then enter: wq! Press enter to save and exit)
/Usr/local/src/CentOS-7-x86_64-Everything-1503-01.iso/media/CentOS7 defaults, ro, loop 0 0
5. configure the source
Run vi/etc/yum. repos. d/CentOS7-Localsource.repo # to open the repo file, which is created if it does not exist
Press a to enter the editing mode
Enter the following content:
CentOS7-Localsource
Name = CentOS7
Baseurl = file: // media/Centos7
Enabled = 1
Gpgcheck = 0 press ESC to exit edit input: wq press enter to save and then exit 6. generate local yum cache and execute yum makecache
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service