RHCE Local source authoring, HTTP release image for KVM VM New Installation process

Source: Internet
Author: User
Tags yum repolist

Recently studying the RHCE course, simply talk about how to use HTTP as the KVM VM network installation process, then also will be talked about Ftp+http+kickstart release, as well as PXE installation Rhel.

Environment:

Virtual Host: RHEL 7.0

Hardware: 4vcpu+8g+40gdisk

IP Address: 172.16.38.10

I first install the VMware Workstation 12 on the notebook, and create a new RHEL7 virtual machine as the host (this step omitted, need VM12 and RHEL7, will be in my share of the network disk)

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/79/wKiom1hOt1CzBiOEAALjCI9bOwU066.png "height=" 526 "/>

1. Make a local source, generally Rhel source is from the Redhat site source, so we assume the entire environment for the internal private, do not need to download the public (there will be an article to teach you how to replace the Rhel Yum source), the virtual machine load RHEL7 ISO;

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/76/wKioL1hOt1DjIUBvAABVr7Yf2IM342.png "height=" 344 "/>

2. Create a new directory/mnt/dvd in RHEL7 and mount the DVD image;

[[email protected] ~]# lsblk   #用于列出所有可用块设备的信息      NAME           MAJ:MIN RM  SIZE RO TYPE  mountpoint    sda              8:0    0   40G  0 disk      ├─sda1          8:1    0  500m   0 part /boot    └─sda2           8:2    0 39.5G  0 part        ├─rhel-root 253:0    0 35.5g  0 lvm  /       └─rhel-swap 253:1    0    4g   0 lvm  [swap]    sr0             11:0    1  3.5g  0 rom  [[email protected]  ~]# mkdir /mnt/dvd     #创建/mnt/dvd Catalogue      [[email  protected] ~]# mount /dev/sr0 /mnt/dvd   #挂载dvd镜像到目录    mount :  /dev/sr0 is write-protected, mounting read-only

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/76/wKioL1hOt1KiT02bAAA0YcdbbVc623.png "height=" 193 "/>

3. Create a new repo file and point to/mnt/dvd;

[Email protected] ~]# Vim/etc/yum.repos.d/rhel.repo #新建repo配置文件 [[email protected] ~]# Cat/etc/yum.repos.d/rhel.rep o #显示repo配置文件 [rhel7] name=rhel7 Baseurl=file:///mnt/dvd enabled=1 gpgcheck=0

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/76/wKioL1hOt1aDknq7AAAeAXgdDaA301.png "height=" 122 "/>

Using Yum repolist to view the package information, you can see the package that gets to/mnt/dvd

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/76/wKioL1hOt1bQwrvjAAAsMuhPdwo487.png "height="/>

4. Install the HTTTPD software package as the Web server's publishing mirror site;

[email protected] ~]# Yum install httpd–y #安装httpd服务


650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/79/wKiom1hOt1fA94dXAABtMK79cwI163.png "height=" 254 "/>

Start and enable the HTTPD service (firewall and SELinux will be banned for the time being and will continue to speak Firewall service)

[Email protected] ~]# systemctl start httpd #启动httpd服务 [[email protected] ~]# Systemctl enable httpd #启用httpd服务 [Email protected] ~]# systemctl status httpd #查看httpd服务状态 [[email protected] ~]# systemctl stop Firewalld #关闭fi Rewall service [[email protected] ~]# Setenforce 0 #关闭SELinux


650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/79/wKiom1hOt1vhg0NeAACJCFUyQGo117.png "height=" 362 "/>
We can test the access to the Web server in the notebook, and I'll add a index.html to this.

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/76/wKioL1hOt1uA5Q6nAAAU9gTRTnU695.png "height="/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/76/wKioL1hOt1ySdaFMAABEVaXD66A271.png "height=" 249 "/>

5. Build the Web server above, we attach the DVD image on the host to the Web server;

[[email protected] ~]# mkdir/var/www/html/dvd #新建/var/www/html/dvd directory [[email protected] ~]# mount/dev/sr0/var/www/ Html/dvd #将dvd镜像挂载到/var/www/html/dvd Catalog mount:/dev/sr0 is write-protected, mounting read-only

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/76/wKioL1hOt1-SqZegAAAbBu8uMhc450.png "height="/>

When we visit the DVD directory of the Web server, we can see

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/76/wKioL1hOt2OiAGh-AAB7ewQXDwY969.png "height=" 619 "/>

6. We start installing KVM (Note: Remember to turn on the CPU vt-x or amd-x of the virtual machine);

[email protected] ~]# Yum install QEMU-KVM qemu-img virt-manager libvirt*–y #安装KVM, Virt-manager and Libvirt packages complete! [Email protected] ~]#


650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/79/wKiom1hOt2Tifv6zAAAxl5Fz67E669.png "height=" 166 "/>

7. We install a new Rhel virtual machine in the KVM management interface through the network installation;

[Email protected] ~]# virt-manager #打开virt-manager interface [[email protected] ~]#

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/79/wKiom1hOt2Sw5GUwAAAQVa1OvtM160.png "height="/>

8. In the Virt-manager interface, click on "Edit-connection Details" (This step is done first because we need to configure the KVM virtual network);

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/76/wKioL1hOt2XCM8dnAAA7287e8Lc314.png "height=" 191 "/>

9. In the Locahost Connection details interface, click "Virtual networks--+";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/76/wKioL1hOt2azgiqKAABjva8kyoA601.png "height=" 574 "/>

10. In the Create a new virtual network interface, click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" http:// S3.51cto.com/wyfs02/m01/8b/76/wkiol1hot2fiqcs0aac6-o5rlk0920.png "height=" 521 "/>

11. In the Create a new virtual network-naming your virtual network, enter "vNet01" in Network Name and click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/79/wKiom1hOt2fRF4XkAACtSO8F3S0809.png "height=" 518 "/>

12. In the Create a new virtual network-defining IPV4 addresses, configure the IPv4 address, I'll keep the default here, click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/76/wKioL1hOt2ygh5HxAAChJlqNb3s754.png "height=" 521 "/>

13. In Create a new virtual network-defining IP6 addresses, click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/79/wKiom1hOt22zvp6cAACi5xT3ynk164.png "height=" 521 "/>

14. In Create a new virtual network-miscellaneous Settings, tick "Isolated virtual network (host only means that the host and the VM can be interoperable, but not outside the host)" , click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/79/wKiom1hOt27zjsUnAACebDdZ_mQ021.png "height=" 521 "/>

15. In Create a new virtual Network-ready to creat network, click "Finish";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/79/wKiom1hOt3HgqZkBAACSubkOqVA583.png "height=" 521 "/>

Effect:

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/79/wKiom1hOt3iRP1LAAACIDiEdrVg578.png "height=" 419 "/>

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/79/wKiom1hOt3nR6-ItAABsMqwGQrA026.png "height=" 329 "/>

16. In the Virt-manager interface, click "New";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/76/wKioL1hOt3nCNA4cAABNRc2s0FE999.png "height=" 217 "/>

17. In the new VM interface, enter Vmname, tick "Network Install (http,ftp, or NFS)" and click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/76/wKioL1hOt3_ws14JAACABvP8cDs519.png "height=" 414 "/>

18. In NEW-VM the second step, enter Url:http://192.168.100.1/dvd, (here is a question, why IP is 192.168.100.1, not 172.16.38.10, this IP is the KVM virtual network that we created before, the new VM will communicate with this IP, click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/79/wKiom1hOt4DwIpjEAABh-BTCpe4800.png "height=" 414 "/>

19. In the third step of NEW-VM, click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/8B/76/wKioL1hOt4DzI8BGAABblo_c2rk156.png "height=" 414 "/>

20. In the new VM Fourth step, click "Forward";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/79/wKiom1hOt4HBjAhJAAB0KOPkutc036.png "height=" 414 "/>

21. In the new VM fifth step, click "Finish";

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/8B/79/wKiom1hOt4HTJixcAABqACO_jfc467.png "height=" 414 "/>

22.!!!

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/8B/7A/wKiom1hOt4OjbMmKAAI2W9Ngv4A577.png "height=" 646 "/>

This article from "Gs_hao" blog, declined reprint!

RHCE Local source authoring, HTTP release image for KVM VM New Installation process

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.