linux下PXE和KickStart实现Linux下的无人值守安装
来源:互联网 发布:阿里云服务器动态ip 编辑:程序博客网 时间:2024/06/14 04:13
原理
1. DHCP服务器给需要安装的机器分发IP, 并指定ftp服务器地址和pxelinux.02. 客户端连接到服务器,读取启动文件 /tftpboot/pxelinux.cfg/default3. 根据default里面指定的ks.cfg文件的位置,打开KickStart配置文件,4. 根据ks.cfg的ftp服务器的配置, 读取/var/ftp/pub/文件, 引导安装程序
安装所需服务和工具
need packages:
system-config-kickstart ##自动应答脚本制作工具
syslinux ##获得pxelinux.0文件安装包
dhcp ##分配ip给客户机的服务
tftp-server ##提供tftp协议的服务
httpd ##安装源共享服务
[root@server19 ~]# yum install dhcp httpd tftp-server lftp -y[root@server19 ~]# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf cp: overwrite ‘/etc/dhcp/dhcpd.conf’? y[root@server19 ~]# vim /etc/dhcp/dhcpd.conf [root@server19 ~]# systemctl restart dhcpd[root@server19 ~]# systemctl start httpd[root@server19 ~]# systemctl enable httpdln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'[root@server19 ~]# vim /etc/xinetd.d/tftp disable = no[root@server19 ~]# systemctl restart xinetd.service [root@server19 ~]# chkconfig --list
配置dhcp服务
配置dhcp配置文件
option domain-name “example.com”; ##域名
option domain-name-servers 172.25.254.119; ##dns
default-lease-time 600; ##默认租约期
max-lease-time 7200; ##最长租约期
log-facility local7; ##日志级别
subnet 172.25.254.0 netmask 255.255.255.0 { ##网段,子网掩码
range 172.25.254.10 172.25.254.30; ##地址范围
option routers 172.25.254.254; ##网关
filename “pxelinux.0”; ##pxe启动程序
next-server 172.25.254.19; ##tftp主机地址
}
systemctl restart dhcpd
systemctl stop firewalld
dhcp服务配置
tftp服务是xinetd的子服务.
cat /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 ##将yes更改为no per_source = 11 cps = 100 2 flags = IPv4}systemctl restart xinetd
[root@foundation19 html]# system-config-kickstart ##配置ks.cfg保存至/var/www/html/ /usr/share/system-config-kickstart/kickstartGui.py:104: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated xml = gtk.glade.XML ("/usr/share/system-config-kickstart/system-config-kickstart.glade", domain="system-config-kickstart")Loaded plugins: langpacks, product-id[root@foundation19 html]# lsindex.html ks.cfg rhel7 rhel7.2 westos.html[root@foundation16 html]# vim ks.cfg
在server :
cd /var/lib/tftpboot/mkdir pxelinux.cfg在主机拷贝需要的文件:mount the iso of the rhel7scp isolinux/* 172.25.254.119:/var/lib/tftpboot在server:cp /var/lib/tftpboot/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/defaultcp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/vim /var/lib/tftpboot/pxelinux.cfg/default
- linux下PXE和KickStart实现Linux下的无人值守安装
- linux下PXE和KickStart实现Linux下的无人值守安装
- 学习运维——linux下pxe+kickstart无人值守安装linux
- CentOS下配置PXE+Kickstart无人值守安装
- CentOS下配置PXE+Kickstart无人值守安装
- CentOS5.4下配置PXE+Kickstart无人值守安装
- CentOS 6.4下PXE+Kickstart无人值守安装操作系统
- CentOS 6.7下PXE+Kickstart无人值守安装操作系统
- CentOS 7下PXE+Kickstart无人值守安装操作系统
- CentOS 下PXE+Kickstart无人值守安装操作系统
- CentOS 6.4下PXE+Kickstart无人值守安装操作系统
- CentOS 6.4下PXE+Kickstart无人值守安装操作系统
- CentOS 6.7下PXE+Kickstart无人值守安装操作系统_markdown
- 使用PXE+DHCP+Apache+Kickstart无人值守安装linux
- pxe+kickstart实现无人值守安装系统
- linux下PXE无人值守环境自动安装脚本
- Linux Kickstart无人值守安装
- Linux Kickstart无人值守安装
- Linux 查看登录信息(w/who/last/lastlog)
- 一个基于Rxjava2+MVP的自定义文本阅读器
- Oracle 数据库一些常见的优化
- 增长黑客-之“bug营销”范例及设想思考!
- obs-studio 断线重连
- linux下PXE和KickStart实现Linux下的无人值守安装
- eclipse下新建jsp页面失败,提示错误。
- 小米5调试出现DELETE_FAILED_INTERNAL_ERROR错误
- CSU 1642 Problem B
- CodeForces 813A|813B|813C|813D
- Linux 下配置静态ip地址
- Java 类加载机制详解
- [Leetcode] 200. Number of Islands 解题报告
- 欢迎使用CSDN-markdown编辑器