博客
关于我
shell_一键部署PXE
阅读量:102 次
发布时间:2019-02-26

本文共 1294 字,大约阅读时间需要 4 分钟。

一键部署PXe环境

安装并启用TFTP服务

在系统上安装并启动TFTP服务:

yum -y install tftp-server xinetd  sed -i '10s/yes/no/' /etc/xinetd.d/tftp  sed -i '14s/yes/no/' /etc/xinetd.d/tftp  systemctl start tftp  systemctl enable tftp  systemctl start xinetd  systemctl enable xinetd

安装并启用DHCP服务

安装并配置DHCP服务:

yum -y install dhcp expect  cp/usr/bin/expect  
spawnp cp usr share doc dhcp-4.2.5 dhcpd.conf.example etc dhcp dhcpd.conf expect "是否覆盖" { send "y\n" }
cat > /etc/dhcp/dhcpd.conf
ddns-update-style none; next-server 192.168.133.13; filename "pxelinux.0"; subnet 192.168.133.0 netmask 255.255.255.0 { range 192.168.133.100 192.168.133.200; option routers 192.168.133.13; }
systemctl start dhcpd systemctl enable dhcpd

准备Linux内核和初始化镜像文件

将镜像文件复制到TFTP根目录:

cd /mnt/images/pxeboot  cp vmlinuz /var/lib/tftpboot/  cp initrd.img /var/lib/tftpboot/

安装并配置PXE引导程序

安装并配置PXe引导程序:

yum -y install syslinux  cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/

安装FTP服务并准备CentOS 7安装源

安装并配置FTP服务:

yum -y install vsftpd  mkdir /var/ftp/centos7  cp -rf /mnt/* /var/ftp/centos7/  systemctl start vsftp  systemctl enable vsftpd

配置启动菜单文件

创建PXe配置文件:

mkdir /var/lib/tftpboot/pxelinux.cfg  cat > /var/lib/tftpboot/pxelinux.cfg/default 

通过以上步骤,您可以快速配置并部署PXe环境。

转载地址:http://hseu.baihongyu.com/

你可能感兴趣的文章
org.apache.commons.beanutils.BasicDynaBean cannot be cast to ...
查看>>
org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not s
查看>>
sqlserver学习笔记(三)—— 为数据库添加新的用户
查看>>
org.apache.http.conn.HttpHostConnectException: Connection to refused
查看>>
org.apache.ibatis.binding.BindingException: Invalid bound statement错误一例
查看>>
org.apache.ibatis.exceptions.PersistenceException:
查看>>
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
查看>>
org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
查看>>
org.apache.poi.hssf.util.Region
查看>>
org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
查看>>
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
查看>>
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'
查看>>
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
查看>>
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
查看>>
org.springframework.amqp.AmqpConnectException:java.net.ConnectException:Connection timed out:connect
查看>>
org.springframework.beans.factory.BeanDefinitionStoreException
查看>>
org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
查看>>
org.springframework.boot:spring boot maven plugin丢失---SpringCloud Alibaba_若依微服务框架改造_--工作笔记012
查看>>
SQL-CLR 类型映射 (LINQ to SQL)
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>