成人午夜视频全免费观看高清-秋霞福利视频一区二区三区-国产精品久久久久电影小说-亚洲不卡区三一区三区一区

如何進(jìn)行pxe自動(dòng)化安裝系統(tǒng)-創(chuàng)新互聯(lián)

這期內(nèi)容當(dāng)中小編將會(huì)給大家?guī)碛嘘P(guān)如何進(jìn)行pxe自動(dòng)化安裝系統(tǒng),文章內(nèi)容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。

網(wǎng)站建設(shè)公司,為您提供網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)頁(yè)設(shè)計(jì)及定制網(wǎng)站建設(shè)服務(wù),專注于成都定制網(wǎng)站,高端網(wǎng)頁(yè)制作,對(duì)成都玻璃貼膜等多個(gè)行業(yè)擁有豐富的網(wǎng)站建設(shè)經(jīng)驗(yàn)的網(wǎng)站建設(shè)公司。專業(yè)網(wǎng)站設(shè)計(jì),網(wǎng)站優(yōu)化推廣哪家好,專業(yè)seo優(yōu)化優(yōu)化,H5建站,響應(yīng)式網(wǎng)站。

pxe自動(dòng)化安裝系統(tǒng)

pxe自動(dòng)化安裝,所需要的服務(wù)有:dhcp服務(wù)器,tftp服務(wù)器,http服務(wù)器
pxe自動(dòng)化安裝,所需要的包組及相關(guān)安裝文件有:syslinux以及自動(dòng)化安裝系統(tǒng)所需的應(yīng)答文件selinux

實(shí)驗(yàn)說明

本次實(shí)驗(yàn)以一臺(tái)CentOS7作為dhcp服務(wù)器,tftp服務(wù)器,以及http服務(wù)器向本網(wǎng)段內(nèi)的主機(jī)提供自動(dòng)化安裝

實(shí)驗(yàn)準(zhǔn)備

主機(jī)系統(tǒng)IP
CentOS7CentOS7192.168.73.120

一、安裝dhcp服務(wù)、tftp-server服務(wù)、httpd服務(wù)及syslinux包組

[root@centos7 ~]# yum install dhcp tftp-server httpd syslinux -y

二、創(chuàng)建應(yīng)答文件

1.使用system-config-kickstart生成ks6.cfg

[root@centos7 ~]# system-config-kickstart
[root@centos7 ~]# vim ks6.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="http://192.168.73.120/centos/6/os/x86_64"
# Root password
rootpw --iscrypted $1$6oVXZR1R$QOASc6inirmHCZmQ.W9Hg0
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone  Asia/Shanghai
# Network information
network  --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel 
# Disk partitioning information
part /boot --fstype="ext4" --size=200
part / --fstype="ext4" --size=20000
part swap --fstype="swap" --size=1024

%packages
@core

%end

2.復(fù)制ks6.cfg為ks7.cfg,并修改部分參數(shù)

[root@centos7 ~]# cp ks6.cfg ks7.cfg
[root@centos7 ~]# vim ks7.cfg
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use network installation
url --url="http://192.168.73.120/centos/7/os/x86_64"    #將url改為7的url
# Root password
rootpw --iscrypted $1$6oVXZR1R$QOASc6inirmHCZmQ.W9Hg0
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone  Asia/Shanghai
# Network information
network  --bootproto=dhcp --device=ens33 --onboot=on      #將網(wǎng)卡名修改為ens33
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel 
# Disk partitioning information
part /boot --fstype="ext4" --size=200
part / --fstype="ext4" --size=20000
part swap --fstype="swap" --size=1024

%packages
@core

%end

三、配置httpd服務(wù)

1.創(chuàng)建http目錄

[root@centos7 ~]# mkdir -pv /var/www/html/{centos/{6,7}/os/x86_64,ksdir}
mkdir: created directory ‘/var/www/html/centos’
mkdir: created directory ‘/var/www/html/centos/6’
mkdir: created directory ‘/var/www/html/centos/6/os’
mkdir: created directory ‘/var/www/html/centos/6/os/x86_64’
mkdir: created directory ‘/var/www/html/centos/7’
mkdir: created directory ‘/var/www/html/centos/7/os’
mkdir: created directory ‘/var/www/html/centos/7/os/x86_64’
mkdir: created directory ‘/var/www/html/ksdir’

2.將CentOS6及7的光盤文件掛在至相關(guān)的目錄下(工作中可以直接將光盤鏡像復(fù)制至目錄下)

[root@centos7 ~]# lsblk | grep sr
sr0     11:0    1   10G  0 rom  /mnt
sr1     11:1    1  3.7G  0 rom  
[root@centos7 ~]# mount /dev/sr0 /var/www/html/centos/7/os/x86_64/
mount: /dev/sr0 is write-protected, mounting read-only
[root@centos7 ~]# mount /dev/sr1 /var/www/html/centos/6/os/x86_64/
mount: /dev/sr1 is write-protected, mounting read-only
[root@centos7 ~]# lsblk | grep sr
sr0     11:0    1   10G  0 rom  /var/www/html/centos/7/os/x86_64
sr1     11:1    1  3.7G  0 rom  /var/www/html/centos/6/os/x86_64

3.將準(zhǔn)備好的應(yīng)答文件復(fù)制至目錄下

[root@centos7 ~]# cp ks6.cfg /var/www/html/ksdir
[root@centos7 ~]# cp ks7.cfg /var/www/html/ksdir

4.啟動(dòng)httpd服務(wù),并設(shè)置為開機(jī)自動(dòng)啟動(dòng)

[root@centos7 ~]# systemctl start httpd
[root@centos7 ~]# systemctl enable httpd

四、配置tftp服務(wù)器

1.在tftp工作目錄下創(chuàng)建出相關(guān)的文件目錄

[root@centos7 ~]# mkdir -pv /var/lib/tftpboot/{kernel{6,7},pxelinux.cfg}
mkdir: created directory ‘/var/lib/tftpboot/kernel6’
mkdir: created directory ‘/var/lib/tftpboot/kernel7’
mkdir: created directory ‘/var/lib/tftpboot/pxelinux.cfg’

2.將centos6和centos7的內(nèi)核及虛擬文件系統(tǒng)復(fù)制至tftp工作目錄下的相對(duì)應(yīng)kernel目錄中

[root@centos7 tftpboot]# cd /var/lib/tftpboot/kernel6
[root@centos7 kernel6]# cp /var/www/html/centos/6/os/x86_64/isolinux/vmlinuz .
[root@centos7 kernel6]# cp /var/www/html/centos/6/os/x86_64/isolinux/initrd.img .
[root@centos7 kernel6]# cd /var/lib/tftpboot/kernel7
[root@centos7 kernel7]# cp /var/www/html/centos/7/os/x86_64/isolinux/vmlinuz .
[root@centos7 kernel7]# cp /var/www/html/centos/7/os/x86_64/isolinux/initrd.img .

3.復(fù)制啟動(dòng)相關(guān)的文件至tftp工作目錄

[root@centos7 kernel7]# cd /var/lib/tftpboot/
[root@centos7 tftpboot]# cp /usr/share/syslinux/menu.c32 .
[root@centos7 tftpboot]# cp /usr/share/syslinux/pxelinux.0 .

4.復(fù)制光盤上的菜單文件至/var/lib/tftpboot/pxelinux.cfg目錄下改名為default,修改此文件

[root@centos7 tftpboot]# cp /var/www/html/centos/7/os/x86_64/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/default
[root@centos7 tftpboot]# vim /var/lib/tftpboot/pxelinux.cfg/default
default menu.c32            #將此行改為menu.c32
timeout 600

menu title CentOS install

label linux 6
  menu label Install CentOS ^6
  kernel kernel6/vmlinuz    #此處為centos6內(nèi)核所在的路徑
  append initrd=kernel6/initrd.img ks=http://192.168.73.120/ksdir/ks6.cfg               #指定KS文件在網(wǎng)絡(luò)中的位置

label linux 7
  menu label Install CentOS ^7
  kernel kernel7/vmlinuz    #此處為centos7內(nèi)核所在的路徑
  append initrd=kernel7/initrd.img ks=http://192.168.73.120/ksdir/ks7.cfg               #指定KS文件在網(wǎng)路中的位置

label local
  menu label Boot from ^local drive
  localboot 0xffff

5.查看下目錄結(jié)構(gòu)

[root@centos7 tftpboot]#tree
.
├── centos6
│   ├── initrd.img
│   └── vmlinuz
├── centos7
│   ├── initrd.img
│   └── vmlinuz
├── menu.c32
├── pxelinux.0
└── pxelinux.cfg
    └── default

6.啟動(dòng)tftp服務(wù),并設(shè)置為開機(jī)啟動(dòng)

[root@centos7 ~]# systemctl start tftp
[root@centos7 ~]# systemctl enable tftp

五、配置dhcp服務(wù)

1.由于dhcpd默認(rèn)的配置文件為空,此處將dhcpd的樣板配置文件復(fù)制后加以修改

[root@centos7 ~]# cp /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
cp: overwrite ‘/etc/dhcp/dhcpd.conf’? y

2.配置dhcp服務(wù)

[root@centos7 ~]# vim /etc/dhcp/dhcpd.conf
# option definitions common to all supported networks...
option domain-name "mylinuxops.com";                #指定預(yù)添加域名
option domain-name-servers 114.114.114.114;         #指定DNS服務(wù)器

default-lease-time 6000;
max-lease-time 72000;

...中間省略...

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {    #注釋
#}                                              #注釋

# This is a very basic subnet declaration.

subnet 192.168.73.0 netmask 255.255.255.224 {
  range 192.168.73.1 192.168.73.100;        #指定dhcp地址池
  option routers 192.168.73.254;            #指定網(wǎng)關(guān)
  filename "pxelinux.0";                    #指定啟動(dòng)文件
  next-server 192.168.73.120;               #指定tftp服務(wù)器路徑
}

3.啟動(dòng)dhcp服務(wù)器,并設(shè)置為開機(jī)自動(dòng)啟動(dòng)

[root@centos7 ~]# systemctl start dhcpd
[root@centos7 ~]# systemctl enable dhcpd
Created symlink from /etc/systemd/system/multi-user.target.wants/dhcpd.service to /usr/lib/systemd/system/dhcpd.service.

注意:

1.所有服務(wù)部署完畢,進(jìn)行測(cè)試之前,確保網(wǎng)絡(luò)中沒有其他的DHCP服務(wù),避免產(chǎn)生干擾。
2.centos7在自動(dòng)化安裝時(shí)需要1G以上的內(nèi)存空間。
3.安裝時(shí)注意物理磁盤的大小以及ks文件中的磁盤大小 ,確保有足夠的空間進(jìn)行安裝。

上述就是小編為大家分享的如何進(jìn)行pxe自動(dòng)化安裝系統(tǒng)了,如果剛好有類似的疑惑,不妨參照上述分析進(jìn)行理解。如果想知道更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

當(dāng)前名稱:如何進(jìn)行pxe自動(dòng)化安裝系統(tǒng)-創(chuàng)新互聯(lián)
網(wǎng)站URL:http://jinyejixie.com/article44/eiiee.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站制作、域名注冊(cè)移動(dòng)網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)公司、搜索引擎優(yōu)化、品牌網(wǎng)站設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

營(yíng)銷型網(wǎng)站建設(shè)
镇巴县| 阿巴嘎旗| 大邑县| 墨脱县| 镇沅| 离岛区| 外汇| 齐齐哈尔市| 江安县| 林周县| 湟中县| 左权县| 蚌埠市| 上高县| 高安市| 六安市| 闻喜县| 云龙县| 南召县| 大城县| 渭南市| 沂水县| 洪江市| 河津市| 洛隆县| 湖口县| 尚义县| 蒙山县| 广东省| 绥芬河市| 安化县| 澄迈县| 太仓市| 金沙县| 鞍山市| 南江县| 航空| 阳信县| 灵石县| 抚宁县| 长海县|