In a recent study of the RHCE course, the previous article briefly tells you how to use HTTP as a KVM VM network installation process, read: http://gshao.blog.51cto.com/3512873/1882093
Today comes the Ftp+http+kickstart release, and of course PXE installs Rhel (follow-up).
Environment:
Virtual Host: RHEL 7.0
Hardware: 4vcpu+8g+40gdisk
IP Address: 172.16.38.10
Vnet IP Address: 192.168.100.1
First, the appearance of the Rhel system is completed:
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/83/wKiom1hP6e_iLxV8AACq3mckteg807.png "height=" 457 "/>
Return to the body, today speak Httpd+ftp+kickstart release image.
1. Install the HTTPD service first, as we have installed, we first ensure that the HTTPD service starts normally and test the Web server's DVD directory for normal access;
[Email protected] ~]# systemctl status httpd #查看HTPPD服务状态
Httpd.service-the Apache HTTP Server
Loaded:loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active:active (running) since Mon 2016-12-12 21:56:18 CST; 21h ago
Main pid:14615 (httpd)
Status: "Total requests:698; Current requests/sec:0; Current traffic:0 b/sec "
CGroup:/system.slice/httpd.service
├─14615/usr/sbin/httpd-dforeground
├─14616/usr/sbin/httpd-dforeground
├─14617/usr/sbin/httpd-dforeground
├─14618/usr/sbin/httpd-dforeground
├─14619/usr/sbin/httpd-dforeground
├─14620/usr/sbin/httpd-dforeground
├─14881/usr/sbin/httpd-dforeground
├─14933/usr/sbin/httpd-dforeground
├─14934/usr/sbin/httpd-dforeground
└─14935/usr/sbin/httpd-dforeground
Dec 21:56:18 localhost.localdomain httpd[14615]: AH00558:httpd:Could not RELIABLY...E
Dec 21:56:18 localhost.localdomain systemd[1]: Started the Apache HTTP Server.
Hint:some lines were ellipsized, use-l to show on full.
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/83/wKiom1hP6e_B-4fEAABxBScxuk4099.png "height=" 315 "/>
Don't remember wrong oh, here is the external IP address, not the internal vnet IP address;
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/83/wKiom1hP6fDTEhD2AAB177bu_ow625.png "height=" 580 "/>
2. Install the FTP service;
[email protected] ~]# Yum install vsftpd-y #安装vsftpd服务
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/80/wKioL1hP6fGy3ZvlAABd5W7dapE665.png "height=" 482 "/>
3. Start the VSFTPD service, enable the VSFTPD service, and test whether FTP can be accessed normally;
[Email protected] ~]# systemctl start vsftpd #启动vsftpd服务 [[email protected] ~]# Systemctl enable VSFTPD #启用vsftpd服务
Ln-s '/usr/lib/systemd/system/vsftpd.service '/etc/systemd/system/multi-user.target.wants/vsftpd.service '
[Email protected] ~]# systemctl status vsftpd
VSFTPD.SERVICE-VSFTPD FTP Daemon
Loaded:loaded (/usr/lib/systemd/system/vsftpd.service; enabled)
Active:active (running) since Tue 2016-12-13 19:41:51 CST; 21s ago
Main pid:48905 (VSFTPD)
CGroup:/system.slice/vsftpd.service
└─48905/usr/sbin/vsftpd/etc/vsftpd/vsftpd.conf
Dec 19:41:51 Localhost.localdomain systemd[1]: Starting Vsftpd FTP daemon ...
Dec 19:41:51 localhost.localdomain systemd[1]: Started Vsftpd FTP daemon.
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/80/wKioL1hP6fiDL3q8AABQszHjtzY696.png "height=" 219 "/>
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/83/wKiom1hP6fnzBHgXAABGHhrhnx8555.png "height=" 214 "/>
4. Installation of Kickstart services;
[email protected] ~]# Yum install system-config-k #安装KickStart服务
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/80/wKioL1hP6fqTbhNDAAB8yPEhVDA810.png "height=" 408 "/>
5. Start the Kickstart configuration file Control Panel;
[Email protected] ~]# System-config-kickstart & #启动kickstart控制面板
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/80/wKioL1hP6fqAP_bgAAC6v3n_sbg682.png "height=" 601 "/>
6. In the Kickstart Configurator-basic configuration interface, configure time zone for Asia/shanghai, enter root PASSOWRD, tick reboot system after Installation and perform installation in the text mode (grahical is default);
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/80/wKioL1hP6fzyKtN6AAC98WNFBQA006.png "height=" 599 "/>
7. In Kickstart Configurator-installation Method, tick perform new installation, tick HTTP, enter the HTTP server address: 192.168.100.1,http Diretory for 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/M00/8B/80/wKioL1hP6f2yDHDyAACd5WwVgW4949.png "height=" 599 "/>
8. In Kickstart configurator-boot Loader options, tick install new boot Loader, tick install boot Loader on Master boot Record (MBR);
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/80/wKioL1hP6f3i87EFAAC3PfEKqQE676.png "height=" 602 "/>
9. In Kickstart configurator-partition information, tick the clear Master Boot Record, tick Remove all existing partitions, Tick initialize the disk Label,add swap and/partition and allocate space;
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/80/wKioL1hP6f7xQO5zAADGkgWMpbM149.png "height=" 603 "/>
10. In Kickstart configurator-network configuration, click Add Network Device, enter the network device name, configure network type for DHCP;
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/80/wKioL1hP6f-SDdXJAACHrsssdxw308.png "height=" 601 "/>
11. In Kickstart Configurator-firewall configuration, configure SELinux to warn and configure security level to disable Firewall;
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/80/wKioL1hP6gCCAOWZAACYGu9JEMs641.png "height=" 604 "/>
12. Other parts remain default, if you want to add the shell, you can add the corresponding shell script in pre-installation script or post-installation script
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/83/wKiom1hP6gDCZz0AAACQ1843arA867.png "height=" 598 "/>
13. Click File-save;
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/80/wkiol1hp6ghjdtpkaabu1iz4034712.png "height=" 266 "/>
14. Because we build vsftp service before, we store directly in/var/ftp/pub inside;
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/83/wKiom1hP6gKCAoUVAACTfp85Cq0419.png "height=" 626 "/>
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/80/wKioL1hP6gKCoZIzAABbG7xLRIk105.png "height=" 271 "/>
15. Add that the package selection default in the Kickstart Configurator is not selectable;
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/83/wKiom1hP6gPgtkMdAABwRrzNvjc055.png "height=" 486 "/>
16. We can copy part of the package selection to the KS.CFG configuration file we just made by having a anaconda-ks.cfg in the/root directory, which is also the Kickstart configuration file;
[[email protected] ~]# ll #查看 file and directory information in the/root directory
Total 8
-rw-------. 1 root root 1039 Dec 05:26 anaconda-ks.cfg
Drwxr-xr-x. 2 root root 6 Dec 21:29 Desktop ,
Drwxr-xr-x. 2 root root 6 Dec 21:29 do Cuments
Drwxr-xr-x. 2 root root 6 Dec 21:29 Downloads
-rw-r--r--. 1 Root root 1090 Dec 21:27 initial-setup-ks.cfg
Drwxr-xr-x. 2 root root 6 DEC 12 21:2 9 Music
Drwxr-xr-x. 2 root root 6 Dec 21:29 Pictures
Drwxr-xr-x. 2 Root root 6 Dec 21:29 public ,
Drwxr-xr-x. 2 root root 6 Dec 12 21:2 9 Templates
Drwxr-xr-x. 2 root root 6 Dec 21:29 Videos
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/80/wKioL1hP6gPyIYPqAAA8BRxARto393.png "height=" 195 "/>
[[email protected] ~]# vim anaconda-ks.cfg #编辑anaconda-ks.cfg configuration file
#version =RHEL7
# System Authorization Information
Auth--enableshadow--passalgo=sha512
# Use CDROM installation media
CDRom
# Run The Setup Agent on first boot
Firstboot--enable
Ignoredisk--ONLY-USE=SDA
# Keyboard Layouts
Keyboard--vckeymap=us--xlayouts= ' US '
# System Language
Lang en_US. UTF-8
# Network Information
network --bootproto=dhcp--device=eno16777736--onboot=off--ipv6=auto
network --hostname=localhost.localdomain
# Root password
Rootpw-- Iscrypted $6$ut0phhab7rumesng$zax4uy86lomzjykiobwey4baq.w0.7qoe8pakpzayh/ gmmb9im0rx9gpr8hwv3av9axq9drq8y.c7hj6fbicg/
# System timezone
TimeZone America/new_ York--ISUTC
# X Window System configuration information
xconfig --startxonboot &N Bsp
# System bootloader configuration
bootloader--location=mbr--boot-drive=sda
Autopart--TYPE=LVM
# Partition clearing information
Clearpart--none--initlabel< /p>
%packages
@base
@core
@desktop-debugging
@dial-up
@fonts
@gnome-desktop
@guest-agents
@guest-desktop-agents
@input-methods
@internet-browser
@multimedia
@print-client
@x11
%end
We will copy this part and post it to the Ks.cfg configuration file;
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/80/wKioL1hP6gSgiFO9AAAiZmTwpN8390.png "height=" 261 "/>
[Email protected] ~]# vim/var/ftp/pub/ks.cfg #编辑ks. CFG configuration file
#platform =x86, AMD64, or Intel EM64T
#version =devel
# Install OS instead of upgrade
Install
# Keyboard Layouts
Keyboard ' US ' # Reboot after installation
Text
Firstboot--disable
# SELinux Configuration
SELinux--permissive
# System Bootloader Configuration
Bootloader--LOCATION=MBR
# Clear the Master Boot Record
Zerombr
# Partition Clearing Information
Clearpart--all--initlabel
# Disk Partitioning Information
Part swap--fstype= "swap"--size=1024
Part/--fstype= "XFS"--size=5000
%packages
@base
@core
%end
Here the meaning is the minimum installation mode;
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/83/wKiom1hP6gTCokGaAAAQQDDw8zE258.png "height=" 146 "/>
Then we save and exit;
17. Start the Virt-manager interface;
[[email protected] ~]# Virt-manager #启动virt-manager interface
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/80/wKioL1hP6gXyabn9AABQrFbVk54182.png "height=" 381 "/>
18. At Virtual machine Manager, click New, enter name, tick network Install (http,ftp,or NFS), 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/80/wKioL1hP6gbx3hpQAAC6VmJyWds792.png "height=" 591 "/>
19. In the second part of the new VM, enter Url:http://192.168.100.1/dvd, configure Kickstart url:ftp://192.168.100.1/pub/ks.cfg, 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/83/wKiom1hP6gbjQu0cAAB3pH_AgDQ977.png "height=" 422 "/>
20. In the third step of the 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/83/wKiom1hP6gfQ08k3AABbWe7aKG4066.png "height=" 414 "/>
21. 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/M01/8B/80/wKioL1hP6gewiRFfAABz7JjzYyg277.png "height=" 414 "/>
22. 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/M01/8B/83/wKiom1hP6giSTUtTAABqUFgGov8563.png "height=" 414 "/>
23. See this interface, indicating that the Kickstart configuration file is not a problem, you can automate the installation of VMS;
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/80/wKioL1hP6gmToYiVAACNjGEOGLw319.png "height=" 447 "/>
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/83/wKiom1hP6gmCTrNfAABFAtTiVuM186.png "height=" 266 "/>
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/83/wKiom1hP6grTdrHlAAB74N5gteg636.png "height=" 423 "/>
This article from "Gs_hao" blog, declined reprint!
RHCE Httpd+ftp+kickstart release image for KVM automated VM installation process