1.配置yum源
vim /etc/yum.repos.d/development.repo
[development]
name=yum server
baseurl=file:///mnt
enabled=1
gpgcheck=0
2.挂载光盘
mount /dev/sr0 /mnt
3.安装相关软件包
yum install dhcp syslinux xinetd tftp-server
4.配置dhcp
vim /etc/dhcp/dhcpd.conf
5.添加内容
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.91 192.168.1.120;                                                 //ip地址池
  option domain-name-servers 192.168.1.1;                                     //网管地址
  option domain-name "internal.example.org";
  option routers 192.168.1.1;                                                             //网关地址
  option broadcast-address 192.168.1.255;
  next-server 192.168.1.31;                                                              //ftp服务器地址
  filename "pxelinux.0";
  default-lease-time 600;
  max-lease-time 7200;
}
6.启动服务和开机自启动
systemctl start dhcpd.service
systemctl enable dhcpd.service
7.复制启动文件
cd /var/lib/tftpboot/                                                                                               #进入/var/lib/tftpboot/
cp /mnt/isolinux/initrd.img /var/lib/tftpboot                                                           #复制initrd.img到/var/lib/tftpboot目录下
cp /mnt/isolinux/vmlinuz /var/lib/tftpboot/                                                            #复制vmlinuz到/var/lib/tftpboot目录下
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/                                              #复制pxelinux.0到/var/lib/tftpboot目录下
cp /mnt/isolinux/vesamenu.c32 /var/lib/tftpboot/                                                 #复制vesamenu.c32到/var/lib/tftpboot目录下
cp /mnt/isolinux/boot.msg /var/lib/tftpboot/                                                        #复制boot.msg到/var/lib/tftpboot目录下
cd /var/lib/tftpboot/                                                                                             #进入/var/lib/tftpboot目录下
mkdir pxelinux.cfg                                                                                             #在/var/lib/tftpboot目录下创建pxelinux.cfg目录
cd pxelinux.cfg/                                                                                                 #进入pxelinux.cfg目录下
cp /mnt/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default                     #复制isolinux.cfg到pxelinux.cfg目录下并命名为default
vim default                                                                                                       #在/var/lib/tftpboot/pxelinux.cfg目录下修改default文件
label PXE-linux
  menu label ^Install System from PXE-RHEL7.0
  menu default
  kernel vmlinuz
  append initrd=initrd.img ks=ftp://192.168.1.31/ks.cfg ksdevice=eno16777736 ip=dhcp quiet
8.配置tftp-server syslinux
vim /etc/xinetd.d/tftp
service tftp
{
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /var/lib/tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
9.启动服务和开机自启动
systemctl start xinetd.service
systemctl enable xinetd.service
10.安装配置VSFTP
yum -y install vsftpd                       
cp -rf /mnt/* /var/ftp/pub/                    
11.启动服务
systemctl start vsftpd
systemctl enable vsftpd
12.无图形界面配置kickstart一键安装应答文件
vim /var/ftp/ks.cfg
#platform=x86, AMD64, 或 Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'# Reboot after installation
reboot
# Root password
rootpw --iscrypted $1$FyasdJen$q2zUDfVq.ln1FmIlP8O/m0                       //root密码为7788521
# System timezone
timezone Asia/Shanghai
# Use network installation
url --url="ftp://192.168.1.31/pub"
# System language
lang en_US
# Firewall configuration
firewall --disabled
# Network information
network  --bootproto=dhcp --device=eno16777736
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use graphical install
graphical
firstboot --disable
# SELinux configuration
selinux --disabled
 
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part swap --asprimary --fstype="swap" --size=2048
part /boot --asprimary --fstype="xfs" --size=500
part / --asprimary --fstype="xfs" --grow --size=1
 
%packages
@base
 
%end
图形化系统可以安装Kickstart
1.安装Kickstart
yum -y install system-config-kickstart.noarch
2.启动Kickstart软件
system-config-kickstart
13.修改SELinux状态
vim /etc/sysconfig/selinux
SELINUX=disabled
14.开放防火墙服务和端口
firewall-cmd --permanent --add-service=dhcp
firewall-cmd --permanent --add-service=vsftpd
firewall-cmd --permanent --add-port=69/udp
firewall-cmd --permanent --add-port=111/tcp
firewall-cmd --permanent --add-port=111/udp
firewall-cmd --permanent --add-port=20048/tcp
firewall-cmd --permanent --add-port=20048/udp
firewall-cmd --reload

RHEL7下PXE+FTP+Kickstart无人值守安装操作系统的更多相关文章

  1. RHEL7下PXE+NFS+Kickstart无人值守安装操作系统

    RHEL7下PXE+NFS+Kickstart无人值守安装操作系统 1.配置yum源 vim /etc/yum.repos.d/development.repo [development] name= ...

  2. RHEL7下PXE+Apache+Kickstart无人值守安装操作系统

    RHEL7下PXE+Apache+Kickstart无人值守安装操作系统 1.配置yum源 vim /etc/yum.repos.d/development.repo [development] na ...

  3. [转]CentOS 6.4下PXE+Kickstart无人值守安装操作系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  4. CentOS 6.4下PXE+Kickstart无人值守安装操作系统 转

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  5. CentOS 6.6下PXE+Kickstart无人值守安装操作系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  6. 【转载】CentOS 6.4下PXE+Kickstart无人值守安装操作系统

    [转载]CentOS 6.4下PXE+Kickstart无人值守安装操作系统 转自:CentOS 6.4下PXE+Kickstart无人值守安装操作系统 - David_Tang - 博客园 http ...

  7. Centos下PXE+Kickstart无人值守安装操作系统

    一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持 ...

  8. CentOS 7下PXE+Kickstart无人值守安装操作系统

    1.简介 1.1. 什么是PXE PXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支 ...

  9. CentOS 6.5下PXE+Kickstart无人值守安装操作系统centos7.3

    CentOS 6.5下PXE+Kickstart无人值守安装操作系统centos7.3 一.简介 1.1 什么是PXE PXE(Pre-boot Execution Environment,预启动执行 ...

随机推荐

  1. javascript之typeof、constructor、instanceof

    ref: http://jingyan.baidu.com/article/29697b912f9939ab20de3c8c.html

  2. openstack nova数据库计算结点IP地址

    最近遇到一个问题就是在控制结点上查找nova数据库中 select * from compute_nodes\G;中出现IP地址一直是127.0.0.1不是计算结点的IP,就算修改成计算结点的IP,也 ...

  3. Gson解析json繁杂数据

    碰到json数据.里面格式众多.list+string[]+等等.具体json参数如下: eg:以下为接口参数: "responseData":{ "brandCode& ...

  4. jQuery MVC 科室异步联动

    //科室改变,级联医生 js $("#DepartmentId").change(function () { if (isNaN($(this).val())) { $(" ...

  5. 事后调试之MiniDump转储

    程序发布后,针对在用户使用过程中出现的一些问题进行调试,这个过程可以称为是事后调试.在程序Crash时转储MiniDump文件供软件开发工程师分析是一种比较常用的方法.下面介绍两种常用的在程序Cras ...

  6. Nginx源码研究四:NGINX的内存管理

    关于nginx的内存使用,我们先看代码,下面是nginx_cycle.c中对全局数据结构cycle的初始化过程 pool = ngx_create_pool(NGX_CYCLE_POOL_SIZE, ...

  7. angularJS快速入门

    1.引入脚本文件 <link rel="stylesheet" href="http://lib.sinaapp.com/js/bootstrap/v3.0.0/c ...

  8. Codeforces 138D World of Darkraft

    有一个n*m 的棋盘,每个点上标记了L,R,X 中的一个每次能选择一个没有被攻击过的点(i,j),从这个点开始发射线,射线形状为:1. 若字符是 L,向左下角和右上角发,遇到被攻击过的点就停下来2. ...

  9. laravel框架——路由

    基本路由: Route::get('/', function () { return view('welcome'); }); Route::post('/', function () { retur ...

  10. UILabel的size根据文字的长短变化

     UILabel *label = [[UILabel alloc] init]; label.backgroundColor = [UIColor blackColor]; [self.view a ...