-
自动安装虚拟机
yum install system-config-kickstart.noarch -y ##安装kickstart
system-config-kickstart
![360截图20170421232747311.jpg wKioL1j6KVTjA9XgAABQw-SpqR4838.jpg-wh_50](https://s2.51cto.com/wyfs02/M02/92/03/wKioL1j6KVTjA9XgAABQw-SpqR4838.jpg-wh_500x0-wm_3-wmp_4-s_1950689959.jpg?x-oss-process=image/resize,w_1400/format,webp)
1)
-
![360截图20170421232724514.jpg wKiom1j6KYrwb_39AABg_Xjk2pY736.jpg-wh_50](https://s5.51cto.com/wyfs02/M00/92/03/wKiom1j6KYrwb_39AABg_Xjk2pY736.jpg-wh_500x0-wm_3-wmp_4-s_3977431009.jpg?x-oss-process=image/resize,w_1400/format,webp)
-
文件保存位置
-
-
![360截图20170421232728982.jpg wKioL1j6KYuxKlJaAABJZzqklPc301.jpg-wh_50](https://s5.51cto.com/wyfs02/M00/92/03/wKioL1j6KYuxKlJaAABJZzqklPc301.jpg-wh_500x0-wm_3-wmp_4-s_1388474488.jpg?x-oss-process=image/resize,w_1400/format,webp)
vim /var/www/html/ks.cfg
-
-
![360截图20170421232733975.jpg wKiom1j6KYvD--4YAABjUpnFZrM110.jpg-wh_50](https://s5.51cto.com/wyfs02/M02/92/03/wKiom1j6KYvD--4YAABjUpnFZrM110.jpg-wh_500x0-wm_3-wmp_4-s_1913629600.jpg?x-oss-process=image/resize,w_1400/format,webp)
%end 目的结束
%packages 安装包
vim /mnt/vm_a.sh ##自动安装脚本
![360截图20170421232737731.jpg wKiom1j6KYvQIqsXAAAmbiWnAOY648.jpg-wh_50](https://s5.51cto.com/wyfs02/M01/92/03/wKiom1j6KYvQIqsXAAAmbiWnAOY648.jpg-wh_500x0-wm_3-wmp_4-s_1994538241.jpg?x-oss-process=image/resize,w_1400/format,webp)
安装dhcp 服务,并修改文件
![360截图20170421232752053.jpg wKioL1j6LCXgboTxAACx7M0HBr8800.jpg-wh_50](https://s1.51cto.com/wyfs02/M00/92/03/wKioL1j6LCXgboTxAACx7M0HBr8800.jpg-wh_500x0-wm_3-wmp_4-s_3349168294.jpg?x-oss-process=image/resize,w_1400/format,webp)
![360截图20170421232742755.jpg wKioL1j6KYygQI4vAAB2mBlC5a8691.jpg-wh_50](https://s4.51cto.com/wyfs02/M01/92/03/wKioL1j6KYygQI4vAAB2mBlC5a8691.jpg-wh_500x0-wm_3-wmp_4-s_252561575.jpg?x-oss-process=image/resize,w_1400/format,webp)
测试
![360截图20170421232755861.jpg wKiom1j6KfqQlkAxAAGcMZHLJEs363.jpg-wh_50](https://s1.51cto.com/wyfs02/M01/92/03/wKiom1j6KfqQlkAxAAGcMZHLJEs363.jpg-wh_500x0-wm_3-wmp_4-s_2071270403.jpg?x-oss-process=image/resize,w_1400/format,webp)
![360截图20170421232800314.jpg wKioL1j6KfuwLQFpAAGMK9_Gi18451.jpg-wh_50](https://s5.51cto.com/wyfs02/M01/92/03/wKioL1j6KfuwLQFpAAGMK9_Gi18451.jpg-wh_500x0-wm_3-wmp_4-s_259883327.jpg?x-oss-process=image/resize,w_1400/format,webp)
![360截图20170421232808224.jpg wKioL1j6KfvQmmLkAAAsR71NowE033.jpg-wh_50](https://s5.51cto.com/wyfs02/M00/92/03/wKioL1j6KfvQmmLkAAAsR71NowE033.jpg-wh_500x0-wm_3-wmp_4-s_2993652902.jpg?x-oss-process=image/resize,w_1400/format,webp)
成功
本文转自 漂浮的天堂 51CTO博客,原文链接:http://blog.51cto.com/12774215/1919820,如需转载请自行联系原作者