PEX服务器的部署

一、安装环境

1、注意事项:

  • 保证局域网仅有一个DHCP
  • 不建议在生产环境下做这个实验,因为生产环境有路由器
  • 建议在VM虚拟机环境仅主机模式下做这个实验。
  • 服务器搭建成功之后,需要自动安装系统的机器内存必须≥2G

2、配置虚拟机网络环境

如果是在vm虚拟机中做这个实验,建议在仅主机网络下做。做之前先配置一下虚拟机网络环境:

3、安装必备软件

yum -y install vsftpd dhcp tftp syslinux tftp-server xinetd

二、拷贝镜像文件到FTPFU服务器目录

cd /var/ftp/pub
mkdir dvd
chown ftp:ftp dvd
mkdir -p /mnt/cdrom
mount /dev/sr0 /mnt/cdrom
cp -rf /mnt/cdrom/* dvd/

三、配置dhcp服务器

yum -y install dhcp
vim /etc/dhcp/dhcpd.confallow booting; #允许给为安装的机器分配IP
allow bootp;
ddns-update-style interim;
ignore client-updates;
subnet 192.168.187.0 netmask 255.255.255.0 {     #ip地址和子网掩码
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.187.10;  #DNS地址
range dynamic-bootp 192.168.187.100 192.168.187.200;   #地址池
default-lease-time 21600;       #IP使用时间
max-lease-time 43200;           #最大使用时间
next-server 192.168.187.10;     #客户端获取到下载地址的ip
filename "pxelinux.0";            #引导文件名
}systemctl restart dhcpd
systemctl enable dhcpd

四、配置tftp 服务

vim /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             = dgramprotocol                = udpwait                    = yesuser                    = rootserver                  = /usr/sbin/in.tftpdserver_args             = -s /tftpboot        #设置默认工作目录disable                 = no                  #设置开机自启动per_source              = 11cps                     = 100 2flags                   = IPv4
}

五、创建相关目录并拷贝所需文件

mkdir -p /tftpboot/pxelinux.cfg
cp /var/ftp/pub/dvd/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
cp /usr/share/syslinux/pxelinux.0 /tftpboot/
chmod 644 /tftpboot/pxelinux.cfg/default
cp /var/ftp/pub/dvd/isolinux/* /tftpboot/

六、开启相关服务并设置为自动启动

systemctl start vsftpd
systemctl enable vsftpd
systemctl start xinetd
systemctl enable xinetd
systemctl enable dhcpd
systemctl start  dhcpd

这样PEX服务器已经好了,但是还做不到无人值守。想要做到我们还必须要有anaconda-ks.cfg,而且还必须配置kisckstart

七、配置kisckstart 无人值守安装脚本

system-config-kickstart
cp ks.cfg /var/ftp/pub/
vi /tftpboot/pxelinux.cfg/default把顶部的
default vesamenu.c32
改成 default linux找到这里,添加KS
label linuxmenu label ^Install CentOS 7kernel vmlinuzappend initrd=initrd.img ks=ftp://192.168.187.10/pub/ks.cfg

八、KS文件制作

ks.cfg文件制作需要安装system-config-kickstart

yum -y install system-config-kickstart

安装完进入系统的图形化界面,打开终端命令框输入:

system-config-kickstart

就会弹出软件界面





完成后,点击左上角的保存即可。然后放到:

mv /var/ftp/pub
ftp://192.168.187.10/pub/ks.cfg

以下是我的ks.cfg,建议你自己做一个。

#platform=x86, AMD64, 或 Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --iscrypted $1$DPTdrSOK$LK1fyNqiW/dMoJdDOlDRL/
# Use network installation
url --url="ftp://192.168.187.10/pub/dvd"
# System language
lang zh_CN
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx# Firewall configuration
firewall --disabled
# Network information
network  --bootproto=static --device=eth0 --gateway=192.168.187.10 --ip=192.168.187.50 --netmask=255.255.255.0
# Reboot after installation
reboot
# System timezone
timezone Africa/Abidjan
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="xfs" --size=600
part /home --fstype="xfs" --size=20000
part swap --fstype="swap" --size=1000
part / --fstype="xfs" --grow --size=1%post
mkdir /123
%end

九、问题解决:Warning:/dev/root/ does not exist

报错 :Warning:/dev/root/ does not exist

原因:就是你的机器内存给的太小了。
解决方法:就是把机器内存提升到2G或以上

PXE+KickStart 自动化安装的部署,解决:Warning:/dev/root/ does not exist 的问题相关推荐

  1. U盘安装centos 7 提示 “Warning: /dev/root does not exist, could not boot” 解决办法

    安装centos 7时提示 "Warning: /dev/root does not exist, could not boot" 这个问题是没有找到你的U盘,这个配置是需要在上一 ...

  2. 问题处理1:服务器U盘安装Centos 7.5时提示Warning:/dev/root does not exist

    在安装centos7.5时,有可能会出现Warning:/dev/root does not exist 这是没有找到正确的镜像路径导致的,我们可以在命令行输入ls /dev看一下有哪些盘符 像图中红 ...

  3. U盘安装Centos7提示错误:Warning: /dev/root does not exist

    如图:安装centos 7时提示 "Warning: /dev/root does not exist, could not boot" 这个问题是没有找到U盘,这个配置是需要在上 ...

  4. 记两次U盘安装linux的报错——/dev/root does not exist和磁盘空间缺失

    项目场景: 训练需要,在一台主机安装centos7系统,出现/dev/root does not exist和磁盘空间缺失 问题描述 报错1--/dev/root does not exist 报错2 ...

  5. 安装centos7报错:/dev/root does not exist 问题处理过程

    最近自己做练习的一台实体机服务器硬盘坏了,想着换了重新装一下. 结果就是碰壁,折腾了好几天,一直以为是写U盘的工具有问题.报的错也是奇怪.提示:/dev/root does not exist 并且前 ...

  6. PXE+KickStart自动化安装Linux系统

     PXE+kickstart模式自动安装系统  PXE介绍 预启动执行环境(Preboot eXecution Environment,PXE)也被称为预执行环境,提供了一种使用网络接口(Netw ...

  7. vsftp+tftp+dhcp+pxe+kickstart自动化安装操作系统

    实验环境 " rhel 5 ip 192.168.0.106 #把防火墙关掉 service iptables stop setenforce 0 #挂载镜像到/mnt下 [root@loc ...

  8. CentOS安装教程-解决“Warning:/dev/root does not exist”问题

    在安装CentOS时,若出现"Warning: /dev/root does not exist, could not boot" ,一般情况下是因为未找到安装系统盘的所在位置(例 ...

  9. U盘安装CentOS过程中-解决“Warning:/dev/root does not exist”问题

    一.现象 在安装CentOS时,若出现"Warning: /dev/root does not exist, could not boot" ,一般情况下是因为未找到安装系统盘的所 ...

最新文章

  1. 深度学习100+经典模型TensorFlow与Pytorch代码实现大合集
  2. linux中用户的权限是什么,linux中用户权限设置与更改相关介绍(上)
  3. page rank算法
  4. 无忧企业系统的getshell
  5. java自动创建月份_使用Java根据月份动态绘制BarGraph
  6. python3 robotframework+pycharm框架搭建
  7. 基于JAVA_JSP电子书下载系统
  8. Eclipse安装中文简体语言包(详细)
  9. python filter 求100以内素数
  10. 英文 WINDOWS XP 专业 精简版
  11. 如何执行冲刺sprint
  12. 微信用户昵称特殊符号处理
  13. 基因测序技术发展历史以及一、二、三代测序技术原理及应用
  14. SpringBoot 定时任务实现数据同步方法
  15. 一加七pro计算机没有记录了,尽享速度与激情:一加7T Pro 迈凯伦版评测
  16. 还在用 Guava Cache?它才是 Java 本地缓存之王!
  17. 移动商务进入战国时代 08年市场规模达306.5亿
  18. 从零搭建SSR+VUE框架(附源码)
  19. buu [MRCTF2020]天干地支+甲子 1
  20. .vimrc 错误 E484:打不开syntax.vim E185:Cannot find color scheme

热门文章

  1. 二叉树(一)概念及其三种遍历方式实现
  2. 零基础AI商业插画全能班教程
  3. python极简讲义_Python极简讲义:一本书入门数据分析与机器学习
  4. 2020年的最新的Java面试题
  5. Sugar ORM android 使用
  6. SLAM学习 | 论文研读《ORB: an efficient alternative to SIFT or SURF》
  7. day23【代码随想录】翻转二叉树、对称二叉树、相同的树、另一棵树的子树、完全二叉树的结点个数
  8. 模拟人生5显示与服务器,《GTA5》千人同服是什么样的体验?不是在玩游戏,而是现实?...
  9. 苹果Mac无法打开文档Word ,用户没有访问权限问题解决
  10. 加快chorme浏览器下载速度