memdisk linux iso,Linux自动化安装

本文档详细介绍了如何使用PXE自动化安装CentOS6和7,包括环境配置、ks文件创建、yum仓库调整、网络安装、Kickstart图形化工具的使用、DHCP服务器、TFTP服务器、HTTPD服务器的设置,以及CentOS6和7的不同安装配置。通过自动化安装,可以实现快速部署和统一系统配置。
摘要由CSDN通过智能技术生成

基于centos7的PXE自动化安装centos6,7

环境:

两台主机

一台DHCP,HTTPD,TFTP服务器(一个网卡172.16.44.7,仅主机),一台测试机(一个网卡,仅主机)

关闭仅主机的vmware中dhcp服务

#创建ks文件

yum install system-config-kickstart #kickstart图形化工具

#使用图形化工具创建ks应答文件

#centos7需要修改yum仓库,添加一个"development"的yum仓库

[root@Centos7 ~]# cat ks6_mini.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://172.16.44.7/centos/6/os/x86_64"

# Root password default:centos

rootpw --iscrypted $1$JmO.k3YO$aE.aDZUW/6QQTeIXi0Phn0

# System authorization information

auth --useshadow --passalgo=sha512

# Use graphical install

#graphical

text

firstboot --disable

# 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

# Disk partitioning information

part /boot --fstype="ext4" --size=200

part / --fstype="ext4" --size=102400

part /data --fstype="ext4" --size=51200

part swap --fstype="swap" --size=4096

%packages

@core

%end

[root@Centos7 ~]# cat /var/www/html/ksdir/ks6_desktop.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://172.16.44.7/centos/6/os/x86_64"

# Root password default:centos

rootpw --iscrypted $1$iDhaegPv$emFtFFmLkKBNXq6GgGZ/j.

# System authorization information

auth --useshadow --passalgo=sha512

# Use graphical install

text

firstboot --disable

# 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 --append="crashkernel=auto rhgb quiet" --location=mbr --driveorder="sda"

# Partition clearing information

clearpart --all

# Disk partitioning information

part /boot --fstype="ext4" --size=200

part / --fstype="ext4" --size=102400

part /data --fstype="ext4" --size=51200

part swap --fstype="swap" --size=4096

%packages

@base

@basic-desktop

@core

@debugging

@desktop-debugging

@desktop-platform

@directory-client

@fonts

@general-desktop

@graphical-admin-tools

@input-methods

@internet-applications

@internet-browser

@java-platform

@kde-desktop

@legacy-x

@network-file-system-client

@office-suite

@print-client

@remote-desktop-clients

@server-platform

@server-policy

@workstation-policy

@x11

abrt-gui

certmonger

device-mapper-persistent-data

genisoimage

krb5-workstation

libXmu

mtools

oddjob

pam_krb5

pax

python-dmidecode

qt-mysql

rdesktop

samba-winbind

sgpio

wodim

xorg-x11-xdm

xsettings-kde

xterm

%end

[root@Centos7 ~]# cat ks7_mini.cfg

#platform=x86, AMD64, or Intel EM64T

#version=DEVEL

# Install OS instead of upgrade

install

# X Window System configuration information

xconfig --startxonboot

# Keyboard layouts

# old format: keyboard us

# new format:

keyboard

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值