RHEL7.0 DHCP+TFTP+SYSLINUX+FTP+KICKSTART自动安装
来源:互联网 发布:picasa软件官方下载 编辑:程序博客网 时间:2024/05/18 15:25
使用vmware workstation 9
OS版本:RHEL7.0
RHEL7.0 DHCP+TFTP+SYSLINUX+FTP+KICKSTART 无人值守安装
一、配置DHCP服务器
安装软件包
[root@LiuZhen ~]# rpm -qa dhcp
[root@LiuZhen ~]# yum install dhcp
yum源配置参考我的博客 http://blog.itpub.net/27771627/viewspace-1223153/
[root@LiuZhen ~]# cat /etc/dhcp/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.example
# see dhcpd.conf(5) man page
#
option domain-name "LiuZhen.com"; //hostname
option domain-name-servers 192.168.220.222; //server IP
default-lease-time 600; //租用时间
max-lease-time 7200;
log-facility local7;
allow booting; //pexlinux 使用
allow bootp; //pexlinux 使用
subnet 192.168.220.0 netmask 255.255.255.0 {
range 192.168.220.100 192.168.220.200; //动态获得IP范围
option routers 192.168.221.1; //网关
next-server 192.168.220.222; //pexlinux 使用
filename "pxelinux.0"; //pexlinux 使用
}
重启DHCP服务
[root@LiuZhen ~]# service dhcpd restart
Redirecting to /bin/systemctl restart dhcpd.service
设置开机自动启动DHCP服务
[root@LiuZhen ~]# chkconfig dhcpd on
Note: Forwarding request to 'systemctl enable dhcpd.service'.
ln -s '/usr/lib/systemd/system/dhcpd.service' '/etc/systemd/system/multi-user.target.wants/dhcpd.service'
设置防火墙停止限制DHCP服务
[root@LiuZhen ~]# firewall-cmd --permanent --add-service=dhcp
success
重新启动防火墙
[root@LiuZhen ~]# service firewalld restart
Redirecting to /bin/systemctl restart firewalld.service
这里先不写测试过程,详见我的博客http://blog.itpub.net/27771627/viewspace-1245570/
二、配置TFTP服务
检查tftp包是否存在
[root@LiuZhen ~]# rpm -qa tftp
yum安装tftp
[root@LiuZhen ~]# yum install tftp
安装超级守护进程
[root@LiuZhen xinetd.d]# rpm -qa xinetd
[root@LiuZhen xinetd.d]#
[root@LiuZhen xinetd.d]# yum install xinetd
[root@LiuZhen xinetd.d]# rpm -qa tftp-server
[root@LiuZhen xinetd.d]# yum install tftp-server
[root@LiuZhen xinetd.d]#
查看配置文件
[root@LiuZhen xinetd.d]# cat /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = yes
per_source = 11
cps = 100 2
flags = IPv4
}
修改yes 为no
[root@LiuZhen xinetd.d]# service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
设置防火墙
配置完成,测试方法见我的博客http://blog.itpub.net/27771627/viewspace-1245670/
三、配置syslinux
检查包是否安装
安装包
拷贝以下文件到目录下
修改配置文件
/var/lib/tftpboot/pxelinux.cfg/default
将所有 =hd:LABEL=RHEL-7.0 都改成=ftp://192.168.220.222
可使用命令替换
sed -i "/inst.stage2/s/=hd:LABEL=RHEL-7.0\\\x20Server.x86_64/=ftp:\/\/192.168.220.222/" /var/lib/tftpboot/pxelinux.cfg/default
四、配置VSFTP服务
安装软件包
配置服务和防火墙
将操作系统介质拷贝到FTP目录下
[root@LiuZhen tftpboot]# cp -r /mnt/* /var/ftp
配置完成,可以测试是否可以进入安装
新建空虚拟机,使用hostonly网段,启动测试
测试可以出现引导安装界面,继续配置kickstart,实现无人值守安装
五、配置KICKSTART
拷贝系统默认配置文件,并给与权限
安装软件包
[root@LiuZhen vsftpd]# rpm -q system-config-kickstart
package system-config-kickstart is not installed
[root@LiuZhen vsftpd]#
[root@LiuZhen vsftpd]# yum -y install system-config-kickstart
修改配置文件/var/ftp/pub/ks.cfg
将cdrom 改为 url --url=ftp://192.168.220.222
none改成all
修改配置文件/var/lib/tftpboot/pxelinux.cfg/default
将quiet改为
配置完成,测试效果,启动两个虚拟机一起自动安装测试
安装过程有点慢,配置完
- RHEL7.0 DHCP+TFTP+SYSLINUX+FTP+KICKSTART自动安装
- RHEL7无人值守自动安装 DHCP+TFTP +SYSLINUX+FTP +Kickstart
- Kickstart+PXE+DHCP+TFTP+FTP网络安装CentOS系统
- pxe+dhcp+nfs+tftp自动安装linux[kickstart]
- pxe+dhcp+tftp+kickstart 实现系统自动安装
- kickstart无人值守,PXE+TFTP+FTP+DHCP
- Pxe+dhcp+ftp+tftp+Kickstart+CentOs6.6
- Kickstart+HTTP+DHCP+TFTP+PXElinux实现RedHat的网络自动安装
- Kickstart+NFS+DHCP+TFTP+PXElinux实现CentOS的网络自动安装
- PXE+DHCP+Apache+Kickstart自动安装CentOS
- kickstart +dhcp +tftpd+apache2 自动安装ubuntu环境搭建
- PXE,DHCP,Apache-Kickstart系统集体化自动安装
- NFS+DHCP+TFTP+KICKSTART无人值守安装RHEL4及NIS+autofs身份统一验证
- 【Kickstart+Dhcp+Nfs+Tftp+Pxe 最实用的批量linux服务器安装】
- 【2017/8/10】PXE+TFTP+VSftp+DHCP+Kickstart无人值守安装系统搭建
- Fedora搭建服务器,DHCP+TFTP+FTP+PXE启动安装CentOS
- pxe+dhcp+ftp+tftp 从网络安装linux
- DHCP+TFTP+FTP+PXE启动安装Fedora 14
- printf和cout右向左求值
- android ListView和GridView拖拽移位具体实现及拓展
- Domino Calendar REST API性能调优 之 Server配置篇
- 帧动画以及AnimationDrawable的使用
- LeetCode:Trapping Rain Water(装雨水问题)
- RHEL7.0 DHCP+TFTP+SYSLINUX+FTP+KICKSTART自动安装
- 我
- 开源播放器ijkplayer-android编译
- HTTP协议详解
- 励志
- 如何让Flash不遮挡HTML元素
- 如何用Avro在内存中实现序列化 和反序列化
- js调用打印机打印
- 【Android开发经验】来来来,同学,咱们讨论一下“只能在UI主线程更新View”这件小事