使用PXE工具批量部署服务器

简介: 使用PXE工具批量部署服务器

使用PXE工具批量部署服务器

目录

(1) 安装CentOS 6.5操作系统
(2) 配置与管理PXE主机
(3) 使用PXE批量部署安装服务器


PXE节点规划

20200615081919868.png


前期准备

使用VMware workstation虚拟机软件,采用最小化安装方式安装CentOS 6.5 操作系统,使用镜像CentOS-6.5-x86_64-bin.iso,此虚拟机作为PXE的母机系统,使用该机进行批量安装服务器系统的操作。


(1)安装CentOS 6.5操作系统
①、安装CentOS 6.5操作系统(此处略过)
②、配置PXE(CentOS 6.5)母机
配置IP地址

[root@centos ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

HWADDR=00:0C:29:19:25:65

TYPE=Ethernet

UUID=3cd9fde2-0152-4772-abb5-637fcf1fb61d

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=static

IPADDR=192.168.200.10

NETMSK=255.255.255.0

GATEWAY=192.168.200.1

重启网络服务

[root@centos ~]# service network restart

使用Winscp等远程传输文件软件来连接PXE母机,将CentOS-6.5-x86_64-bin.iso、CentOS-7.2-x86_64-DVD-1511.iso以及PXE.sh上传至PXE母机/root目录下

[root@centos ~]# ll

total 8734000

-rw-r–r--. 1 root root 29 May 1 01:20 abc

-rw-------. 1 root root 921 Apr 11 23:28 anaconda-ks.cfg

-rw-r–r--. 1 root root 4471971840 Jun 15 08:14 CentOS-6.5-x86_64-bin.iso

-rw-r–r--. 1 root root 4329570304 Jun 15 08:16 CentOS-7-x86_64-DVD-1511.iso

-rw-r–r--. 1 root root 8547467 May 12 01:20 etc.tar.gz

-rw-r–r--. 1 root root 9072 Apr 11 23:28 install.log

-rw-r–r--. 1 root root 3161 Apr 11 23:27 install.log.syslog

-rw-r–r--. 1 root root 22027 Jun 15 08:16 PXE.sh

drwxr-xr-x. 2 root root 4096 May 12 04:39 sh

-rw-r–r--. 1 root root 102400000 May 1 05:16 testfile

赋予PXE.sh可执行权限

[root@centos ~]# chmod +x PXE.sh

临时关闭selinux安全组,使用getenforce命令查看

[root@centos ~]# setenforce 0

[root@centos ~]# getenforce

Permissive


(2)配置与管理PXE主机

执行PXE母机安装脚本,选择“1”按”Enter”键安装PXE,命令如下

[root@centos ~]# ./PXE.sh

-------Install Info------------

1: install pxe

2: switch controller mode

3: switch compute mode

4: switch all mode

Please select installation services: (eg :1 / 2 / 3 )

1

Loaded plugins: fastestmirror

Cleaning repos: centos

Cleaning up Everything

Cleaning up list of fastest mirrors

iptables: Setting chains to policy ACCEPT: filter [ OK ]

iptables: Flushing firewall rules: [ OK ]

iptables: Unloading modules: [ OK ]

Loaded plugins: fastestmirror

Determining fastest mirrors

centos | 4.0 kB 00:00 …

centos/primary_db | 4.4 MB 00:00 …

Setting up Install Process

Package httpd-2.2.15-29.el6.centos.x86_64 already installed and latest version

Package wget-1.12-1.8.el6.x86_64 already installed and latest version

Package 12:dhcp-4.1.1-38.P1.el6.centos.x86_64 already installed and latest version

Resolving Dependencies

–> Running transaction check

—> Package syslinux.x86_64 0:4.02-8.el6 will be installed

–> Processing Dependency: mtools for package: syslinux-4.02-8.el6.x86_64

—> Package tftp-server.x86_64 0:0.49-7.el6 will be installed

–> Running transaction check

—> Package mtools.x86_64 0:4.0.12-1.el6 will be installed

–> Finished Dependency Resolution


Dependencies Resolved


=======================================================================


Package Arch Version Repository Size

Installing:

syslinux x86_64 4.02-8.el6 centos 859 k

tftp-server x86_64 0.49-7.el6 centos 39 k

Installing for dependencies:

mtools x86_64 4.0.12-1.el6 centos 194 k


Transaction Summary

Install 3 Package(s)


Total download size: 1.1 M

Installed size: 2.4 M

Downloading Packages:

Total 86 MB/s | 1.1 MB 00:00

Running rpm_check_debug

Running Transaction Test

Transaction Test Succeeded

Running Transaction

Installing : mtools-4.0.12-1.el6.x86_64 1/3

Installing : syslinux-4.02-8.el6.x86_64 2/3

Installing : tftp-server-0.49-7.el6.x86_64 3/3

Verifying : syslinux-4.02-8.el6.x86_64 1/3

Verifying : tftp-server-0.49-7.el6.x86_64 2/3

Verifying : mtools-4.0.12-1.el6.x86_64 3/3


Installed:

syslinux.x86_64 0:4.02-8.el6 tftp-server.x86_64 0:0.49-7.el6


Dependency Installed:

mtools.x86_64 0:4.0.12-1.el6


Complete!

YUM IS READY

Starting dhcpd: [ OK ]

Stopping httpd: [FAILED]

Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.200.10 for ServerName

[ OK ]

Shutting down dhcpd: [ OK ]

Starting dhcpd: [ OK ]

Stopping xinetd: [ OK ]

Starting xinetd: [ OK ]

-------Install Info------------

1: install pxe

2: switch controller mode

3: switch compute mode

4: switch all mode

Please select installation services: (eg :1 / 2 / 3 )

4

Stopping httpd: [ OK ]

Starting httpd: httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.200.10 for ServerName

[ OK ]

Shutting down dhcpd: [ OK ]

Starting dhcpd: [ OK ]

Stopping xinetd: [ OK ]

Starting xinetd: [ OK ]

至此,PXE母机安装完成!

(3)批量安装操作系统

①、安装环境配置说明
所需要安装系统的主机或服务器要与母机在同一网络下。默认主机或服务器为双网卡

注意事项:

20200615082145248.png

主机或服务器开机后按F12键进入PXE网卡启动,选择系统安装,默认为“Install CentOS 7 CONTROLLER”,如图所示。

20200615082246639.png

20200615082235408.png

**至此,系统安装完成!

重启登录成功!**

20200615082255387.png

相关文章
|
2天前
|
域名解析 弹性计算 应用服务中间件
使用域名访问部署在ECS上的网站
使用域名访问部署在ECS上的网站
|
14天前
|
并行计算 前端开发 异构计算
告别服务器繁忙,云上部署DeepSeek
本文以 DeepSeek-R1-Distill-Qwen-32B-FP8 为例,向您介绍如何在GPU实例上使用容器来部署量化的 DeepSeek-R1 蒸馏模型。
|
1天前
|
弹性计算 Ubuntu Linux
一键部署OpenWebUI+Ollama到阿里云ECS,轻松运行DeepSeek!(保姆级教程)
在当今数据驱动的时代,快速部署和管理大模型成为企业的关键需求。阿里云提供了一键部署OpenWebUI+Ollama的便捷方案,支持本地大模型运行和管理。用户也可以选择连接阿里云百炼的在线模型。
一键部署OpenWebUI+Ollama到阿里云ECS,轻松运行DeepSeek!(保姆级教程)
|
5天前
|
人工智能 负载均衡 数据可视化
阿里云出手了,DeepSeek服务器拒绝繁忙,免费部署DeepSeek模型671B满血版
阿里云推出免费部署DeepSeek模型671B满血版服务,通过百炼大模型平台,用户无需编码,最快5分钟、最低0元即可完成部署。平台提供100万免费Token,支持DeepSeek-R1和DeepSeek-V3等多款模型调用,有效解决服务器繁忙问题。新手零基础也能轻松上手,享受高效稳定的API调用和自动弹性扩展功能。教程涵盖开通服务、获取API-KEY及配置Chatbox客户端等步骤,详细指引助您快速实现DeepSeek自由。
72 18
|
7天前
|
人工智能 负载均衡 数据可视化
阿里云出手了,基于百炼一键部署DeepSeek满血版,告别服务器繁忙1
阿里云百炼平台推出一键部署DeepSeek-R1满血版671B模型,提供100万免费Token,无需编码,新手5分钟内即可完成部署。通过Chatbox客户端配置API,轻松实现模型调用,解决服务器繁忙问题,支持自动弹性扩展,降低硬件成本。详情及教程见阿里云百炼官网。
168 5
|
16天前
|
机器学习/深度学习 人工智能 开发者
DeepSeek服务器繁忙?拒绝稍后再试!基于阿里云PAI实现0代码一键部署DeepSeek-V3和DeepSeek-R1大模型
阿里云PAI平台支持零代码一键部署DeepSeek-V3和DeepSeek-R1大模型,用户可轻松实现从训练到部署再到推理的全流程。通过PAI Model Gallery,开发者只需简单几步即可完成模型部署,享受高效便捷的AI开发体验。具体步骤包括开通PAI服务、进入控制台选择模型、一键部署并获取调用信息。整个过程无需编写代码,极大简化了模型应用的门槛。
197 7
|
2天前
|
弹性计算 Ubuntu Docker
在ECS上使用百炼部署满血版deepseek r1
在ECS上使用百炼部署满血版deepseek r1
|
数据采集 SQL 弹性计算
使用云服务器ECS部署了自己的第一个爬虫
云服务器部署爬虫爬取网站最新通告并推送
使用云服务器ECS部署了自己的第一个爬虫
|
14天前
|
存储 机器学习/深度学习 人工智能
2025年阿里云GPU服务器租用价格、选型策略与应用场景详解
随着AI与高性能计算需求的增长,阿里云提供了多种GPU实例,如NVIDIA V100、A10、T4等,适配不同场景。2025年重点实例中,V100实例GN6v单月3830元起,适合大规模训练;A10实例GN7i单月3213.99元起,适用于混合负载。计费模式有按量付费和包年包月,后者成本更低。针对AI训练、图形渲染及轻量级推理等场景,推荐不同配置以优化成本和性能。阿里云还提供抢占式实例、ESSD云盘等资源优化策略,支持eRDMA网络加速和倚天ARM架构,助力企业在2025年实现智能计算的效率与成本最优平衡。 (该简介为原文内容的高度概括,符合要求的字符限制。)
|
15天前
|
存储 弹性计算 人工智能
2025年阿里云企业云服务器ECS选购与配置全攻略
本文介绍了阿里云服务器的核心配置选择方法论,涵盖算力需求分析、网络与存储设计、地域部署策略三大维度。针对不同业务场景,如初创企业官网和AI模型训练平台,提供了具体配置方案。同时,详细讲解了购买操作指南及长期运维优化建议,帮助用户快速实现业务上云并确保高效运行。访问阿里云官方资源聚合平台可获取更多最新产品动态和技术支持。