Linux system Installation

Source: Internet
Author: User

First, configure the virtual machine automatic installation

1, according to the Yum source Configuration blog:http://13132323.blog.51cto.com/13122323/1951991

First install the Auto answer Script tool Yum install System-config-kickstart–y, and then shut down the host's firewall because he will have an impact on the HTTP service. The virtual machine is blocked from accessing the host site Directory.

2, Use the automatic answer script to create a script, put the generated script to the host default HTTP service under the Site Directory /var/www/html/ .

executes the command System-config-kickstart into the Scripting tool (there is a file in the upper corner that can be saved to the site directory)

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9D/40/wKioL1l8daDj6jpxAADX6u4w5ik610.png "title=" Screenshot from 2017-07-29 10-58-05.png "alt=" Wkiol1l8dadj6jpxaadx6u4w5ik610.png "/>

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/9D/40/wKiom1l8ddaRA1slAACYPbIfheU137.png "title=" Screenshot from 2017-07-29 10-59-02.png "alt=" Wkiom1l8ddara1slaacypbifheu137.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9D/40/wKioL1l8difxaeGcAADFHXmzfJk916.png "title=" Screenshot from 2017-07-29 10-59-39.png "alt=" Wkiol1l8difxaegcaadfhxmzfjk916.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M01/9D/40/wKioL1l8djiDWi7OAADW003KOmQ510.png "title=" Screenshot from 2017-07-29 11-01-53.png "alt=" Wkiol1l8djidwi7oaadw003komq510.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/9D/40/wKioL1l8dkfSi2OnAABdnwEQTbE303.png "title=" Screenshot from 2017-07-29 11-02-29.png "alt=" Wkiol1l8dkfsi2onaabdnweqtbe303.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9D/40/wKioL1l8dn7wXOXBAABmGzgWcWc535.png "title=" Screenshot from 2017-07-29 11-02-59.png "alt=" Wkiol1l8dn7wxoxbaabmgzgwcwc535.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9D/40/wKiom1l8dpLDj8R9AABc2eeDoJ4464.png "title=" Screenshot from 2017-07-29 11-03-17.png "alt=" Wkiom1l8dpldj8r9aabc2eedoj4464.png "/>

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/9D/40/wKioL1l8eS3gZ67rAABf9eHvHhw466.png "title=" 555. PNG "alt=" Wkiol1l8es3gz67raabf9ehvhhw466.png "/>

Other options Select the default option

We also need to modify the ks.cfg script so that he automatically installs the base package and vim, adding the following life to the end of the file:

%packages #packages需要有s vim-enhanced @base #以 @ begins, indicating that he is a group of soft pack%end #每一组以%end End

We can execute the command ksvalidator command to check ks.cfg 's language. Without a syntax error, we can do the following:

after completion, click Save under File in the upper-right corner, save it to the site directory, we can view the files under his site directory. Then write out the virtual machine auto-install script.

vim/etc/script/create.sh/!bin/sh virt-install--name $*--vcpus 1--ram 1024x768--file/var/lib/ Libvirt/images/$*.qcow2--file-size 8--location http://172.25.254.31/rhel7.0--extra-args "ks=http://172.25.25 4.31/ks.cfg "

Execute the script, this is the simple virtual machine one-click installation function

second, the system installation

1, How to see the system during the installation process what files are required?

We can virt-manager, double-click the name of your virtual machine, the virtual will start instead of booting from the network card, this is what we can see the following interface:

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9D/41/wKiom1l8fonhB8d1AABBKqQnvEM732.png "title=" Screenshot from 2017-07-28 13-46-49_ see King. png "alt=" Wkiom1l8fonhb8d1aabbkqqnvem732.png "/>

we can see that when the host's DHCP service gave him the IP, he went to the host (172.25.254.250) TFTP default site directory to find the bootstrapper pxelinux.0, and then pxelinux.cfg below the site directory to find the Ac19fae file. at this point you need to install pxelinux, tftp,DHCP service

2. Install the service and configure the installation source

Yum Install DHCP Tftp-server syslinux–y # three services with DHCP Tftpsyslinux installed separately

1. View The default site directory for TFTP  

[[email protected] yum.repos.d]# rpm-ql tftp-server/etc/xinetd.d/tftp #/etc/text plus general configuration file/usr/lib/systemd/system/tft P.service #一般是库文件/usr/lib/systemd/system/tftp.socket #tftp的socket文件/usr/sbin/in.tftpd/usr/share/doc/ tftp-server-5.2/usr/share/doc/tftp-server-5.2/changes/usr/share/doc/tftp-server-5.2/readme/usr/share/doc/ tftp-server-5.2/readme.security/usr/share/man/man8/in.tftpd.8.gz/usr/share/man/man8/tftpd.8.gz/var/lib/ Tftpboot #根据经验可以看出他为tftp的站点目录.

2 "Then we can execute rpm–ql syslinux|grep pxeliux.0 to find this file .

[Email protected] yum.repos.d]# rpm-ql syslinux |grep pxelinux.0/usr/share/syslinux/gpxelinux.0/usr/share/syslinux/ pxelinux.0# then copy the pxelinux.0 to the TFTP site Directory cp/usr/share/sysliux/pxelinux.0/var/lib/tftpboot/

3 . copy everything from the Isolinux directory in the ISO image to the TFTP site Directory, which is the installation package required during installation

cp/var/www/html/rhel7.0/isolinux/*/var/lib/tftpboot

4 "Create pxelinux.cfg directory

[Email protected] yum.repos.d]# rpm-ql syslinux |grep pxelinux/usr/share/doc/syslinux-4.05/pxelinux.txt/usr/share/ Syslinux/gpxelinux.0/usr/share/syslinux/gpxelinuxk.0/usr/share/syslinux/pxelinux.0# can see that there is a pxelinux reading file, Through him we can see that he will read default defaults

we can read less/usr/share/dos/syslinux-4.05/pxelinux.txt that he reads the default file name , according to the following:

79/mybootdir/pxelinux.cfg/default  

Mkdir/var/lib/tftpboot/pxelinux.cfg Cp/var/lib/tftpboot/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/defaule #var/ Lib/tftpboot/isolinux.cfg this file (i.e., isolinux.cfg in the Isolinxu directory in the disc file) #就是安装虚拟机的这个界面的配置文件

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/9D/41/wKiom1l8gUOgrjo9AAARpL8llC4555.png "title=" Screenshot from 2017-07-29 14-03-51.png "alt=" Wkiom1l8guogrjo9aaarpl8llc4555.png "/>

We can modify the default this content, to adjust the background image of this interface, Countdown and so on.

    5 "Configuration dhcp Configuration file for service reference Bo http://13132323.blog.51cto.com/13122323/1951225

Optiondomain-name "westos.com" #指定客户端得到的dns option domain-name-servers 172.25.254.250 default-lease-time #最短续约日 Period max-lease-time 7200 #最长续约日期 Subnet 10.152.187.0 netmask 255.255.255.0 {#将27, 28 rows Delete the Subent 172.25.254. 0 netmask 255.255.255.0 {range 172.25.254.109 172.25.254.209; option routers 172.25.254.250; #网关 #这个文件读完读下一个主机的pxe linux.0 file next-server 172.25.254.31 filename "pxelinux.0";}

then modify the files in the default

Cp/var/lib/tftpboot/pxelinux.cfg/default/var/lib/tftpboot/pxelinux.cfg/default.ori vim/var/lib/tftpboot/ Pxelinux.cfg/default #This is a system about redhat7.2.it was used by installation system # Append initrd=initrd.img in st.stage2=hd:label=rhel-7.2\x20server.x86_64th.live.check quiet Append initrd=initrd.img repo=http:// 172.25.254.31/rhel7.0 ks=http://172.25.254.31/ks.cfg Quiet

Note: When modifying a configuration file, be sure to back it up and make sure to annotate it when you modify it.

This article is from the "13122323" blog, please be sure to keep this source http://13132323.blog.51cto.com/13122323/1952004

Linux system Installation

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.