RHEL5
Kickstart+PXE+dhcp+tftp
一.所需相关包:
Httpd
NFS-utils
Syslinux
System-config-kickstart
Tftp-server
二.配置
tftp
#chkconfig xinetd
on
#vim
/etc/xinetd.d/tftp
将
disable = yes
改成
disable =
no
#mkdri /tftpbroot
#mkdir
/tftpbroot/pxelinux.cfg
#mkdir
/tftpbroot/rhel5
[root@server ~]#
cat /tftpboot/boot.msg
RH401 PXE Menu
Choose a boot option from the list below:
install - kickstart RHEL5
rescue - Rescue
quit - abandon PXE and boot normally
[root@server ~]#
cat /tftpboot/pxelinux.cfg/default
display boot.msg
prompt 1
timeout 600
default quit
label quit
localboot 0
label install
kernel rhel5/vmlinuz
append initrd=rhel5/initrd.img ks=http://10.10.10.1/ks.cfg
label rescue
kernel rhel5/vmlinuz
append rescue initrd=rhel5/initrd.img ks=http://10.10.10.1/ks.cfg
[root@server ~]#
cp /mnt/rhel5/images/pxeboot/* /tftpboot/rhel5/
三.
Kickstart
配置
[root@server ~]#
cat /var/www/virtual/rhca/ks.cfg
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# Firewall configuration
firewall --enabled --ssh
# Run the Setup Agent on first boot
firstboot --disable
key --skip
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use NFS installation media
nfs --server=10.10.10.1 --dir=/mnt/rhel5
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw --iscrypted $1$N7slsMWl$FxW6teLk6y6IaZKUhD1wb1
# SELinux configuration
selinux --permissive
# Do not configure the X Window System
skipx
# System timezone
timezone Asia/Shanghai
# Install OS instead of upgrade
install
# Disk partitioning information
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part swap --bytes-per-inode=4096 --fstype="swap" --size=512
part / --bytes-per-inode=4096 --fstype="ext3" --grow --size=1
%post 这个是安装完后要执行的命令
mkdir /mnt/rhel5.2
cat >>/etc/fstab << EOF
10.10.10.1:/mnt/rhel5 /mnt/rhel5.2 nfs defaults 0 0
EOF
mount -a
cat >> /etc/yum.repos.d/rhel-debuginfo.repo << EOF
[NFS Server]
name=RHEL 5.2
baseurl=file:///mnt/rhel5/Server
enabled=1
gpgcheck=0
EOF
%packages
vim-enhanced 单独安装某个包
@gnome-desktop 安装某个组件包
以上配置可以使用图形工具
system-config-kickstart
来配置
注意将这个文件
ks.cfg
复制到
/var/www/virtual/rhca
目录下
四.
http
配置
在
/etc/httpd/conf/httpd.conf
里添加以下内容
NameVirtualHost *:80
<VirtualHost *:80>
ServerName rhca.com
DocumentRoot /var/www/virtual/rhca
</VirtualHost>
#chkconfig httpd
on
#/etc/init.d/httpd
restart
五.
Syslinux
#yum install syslinux –y
[root@server ~]# rpm -ql syslinux |grep pxe
/usr/lib/syslinux/pxelinux.0
/usr/share/doc/syslinux-3.11/pxelinux.doc
#cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
六
.DHCP
配置
#chkconfig dhcpd
on
[root@server ~]#
cat /etc/dhcpd.conf
authoritative;
ddns-update-style interim;
ignore client-updates;
subnet 10.10.10.0 netmask 255.255.255.0 {
# --- default gateway
option routers 10.10.10.1;
option subnet-mask 255.255.255.0;
option domain-name "rhca.com";
option domain-name-servers 10.10.10.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 10.10.10.100 10.10.10.200;
default-lease-time 600;
max-lease-time 3600;
next-server 10.10.10.1;
filename "pxelinux.0";
# # we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
#/etc/init.d/dhcpd restart
七.
NFS
配置
#chkconfig nfs on
#/etc/init.d/portmap restart
[root@server ~]# cat /etc/exports
/mnt/rhel5 10.10.10.*(ro,sync)
#/etc/init.d/nfs restart
八.收尾
将
RHEL5.ISO
镜像里的所有文件复制到
/mnt/rhel5
目录下
九
.
启动客户机,使其用网络启动。。
分享到:
相关推荐
rhel6 pxe 网络分发操作系统;rhel6 pxe 网络分发操作系统
rhel6 pxe 安装配置
RHEL5下搭建DNS服务器,学习如何搭建DNS Server
rhel8 pxe 无人值守安装配套工具 https://blog.csdn.net/maokan2008/article/details/102741841
RHEL6下邮件服务器架构 毕业设计.doc
rhel5下lamp服务器的搭建详解.doc
RHEL5+PXE+NFS+Kickstart
网络服务器搭建、配置与管理——Linux(RHEL8CentOS8)(微课版)(第4版)_PPT课件.zip
教程名称:RHEL5企业级Linux服务全攻略课程目录:【】RHEL5 LAMP整体环境搭建【】RHEL5.1主从NIS服务器配置及测试【】rhel5_RHCE官方培训教材【】RHEL5下搭建DNS服务器【】RHEL5企业级Linux 资料汇总及各种服务器...
本文讲述了基于 RHEL 6.8 操作系统搭建开发环境, 主要安装了 GCC 4.9.3、 Qt 5.7、 Apache 2.4.25、 MySQL 5.6.35。 本文同时适用于在 Linux 主机无互联网环境下搭建开发环境, 只需要将所需安装包下载 后拷贝到 ...
RHEL5.5下vsftp服务器搭建 vsftpd服务一览 后台进程: vsftpd 类型: System V 服务 使用端口: 20(ftp-data),21(ftp) 配置文件: /etc/vsftpd/vsftpd.conf /etc/vsftpd.ftpusers /etc/pam.d/vsftpd 日志文件...
RHEL7.3通过PXE启动安装操作系统RHEL7.3通过PXE启动安装操作系统RHEL7.3通过PXE启动安装操作系统
RHEL6:系统安装之无人值守安装(PXE)
内容提要: 第1 季 Linux 服务器的搭建与测试 第2 季 Samba 服务全攻略 第3 季 DHCP 服务全攻略 第4 季 DNS 服务全攻略 ..... 第10 季 NFS 服务全攻略 第11 季 NIS 服务全攻略 第12 季网络访问 Telnet/SSH 全功略
基于redhat 6 安装与搭建网络服务器参考文档
打开密码 www.clvn.com.cn
RHEL5邮件服务器sendmail与dovecot的配置[归纳].pdf
RHEL5邮件服务器sendmail与dovecot的配置[收集].pdf
RHEL5下NFS服务器配置与应用RHEL5下NFS服务器配置与应用
RHEL6+Tomcat6.0.24+JK1.2.32+Httpd2.2.15搭建集群服务器完全手册 一个21页的完整教程,绝对够详细。