Linux system local Yum source configuration

Source: Internet
Author: User

############ #creat Local yumsource##############

Mkdir/westos # # build directory /westos

Mount/iso/rhel-server-7.1-x86_64-dvd.iso/westos # # mount the image file to /westos

Mkdir/backup # # build directory /backup

mv/etc/yum.repos.d/*/backup # # to move the interference files under /etc to the/backup

Cat >/etc/yum.repos.d/yum.repo <<end # # Edit Warehouse file

[Test]

Name=test

Baseurl=file:///westos

Gpgcheck=0

End

Yum Clean All # # Refresh Warehouse Configuration

############# #install shareserver#####################

Yum install httpd-y # # installation httpd

Systemctl Start httpd # startup httpd

Systemctl Enable httpd # # boot start httpd

systemctl Stop Firewalld # # shutting down the firewall

Systemctl Disable FIREWALLD # # boot does not start the firewall


############### #mount ISO to sharedirectory#############

Umount/westos # # Cancel image file Mount

mkdir/var/www/html/rhel7.1 # # #/var/www/html in the directory /rhel7.1

mount/iso/rhel-server-7.1-x86_64-dvd.iso/var/www/html/rhel7.1 ## mount the image file to /rhel7.1

echo "/iso/rhel-server-7.1-x86_64-dvd.iso/var/www/html/rhel7.1 iso9660 ro 0 0" >>/etc/fstab

# # Change temporary mount to permanent Mount

################# #cofig localyum######################

Cat >/etc/yum.repos.d/yum.repo <<end # # re-edit the file /yum.repo

[Test]

Name=test

baseurl=file:///var/www/html/rhel7.1

#baseurl =http://172.25.38.250/rhel7.1

Gpgcheck=0

End

enter http://172.25.38.250/rhel7.1 in the browser to see if the Yum source is configured successfully


This article from the "11904005" blog, reproduced please contact the author!

Linux system local Yum source configuration

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.