侯体宗的博客
  • 首页
  • Hyperf版
  • beego仿版
  • 人生(杂谈)
  • 技术
  • 关于我
  • 更多分类
    • 文件下载
    • 文字修仙
    • 中国象棋ai
    • 群聊
    • 九宫格抽奖
    • 拼图
    • 消消乐
    • 相册

Kickstart无人职守安装RHEL5过程分享(详细图解版)

linux  /  管理员 发布于 7年前   439

之前,发的一个文字版本,现在整理一个图解详细版,让每个人都可以实现Rhel5的无人值守安装。
视频也配置好了!只是没地方发,发个PDF的给大家,大家照着做就没问题了!

测试环境:Redhat 5.3 关闭iptables 和Selinux
所需服务:Dhcp Vsftp Tftp Xinted

一、搭建好Yum源:

详细方法见:https:///os/RedHat/80116.html (使用第二种方法,光盘映像搭建YUM)

二、安装Vsftp服务:
----------------------------------------------
[root@rhce ~]# yum install vsftpd* -y
[root@rhce ~]# chkconfig vsftpd on
[root@rhce ~]# service vsftpd restart
关闭 vsftpd:            [失败]
为 vsftpd 启动 vsftpd:  [确定]
-----------------------------------------------
三、复制PXE启动时需要的文件资料:

1、复制必要的文件:
----------------------------------------------
[root@rhce ~]# cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
[root@rhce ~]# mkdir /tftpboot/pxelinux.cfg
[root@rhce ~]# cp /cdrom/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default
[root@rhce ~]# cp /cdrom/images/pxeboot/initrd.img /tftpboot/
[root@rhce ~]# cp /cdrom/images/pxeboot/vmlinuz /tftpboot/
----------------------------------------------
2、修改/tftpboot/pxelinux.cfg/default文件
----------------------------------------------
[root@rhce ~]# chmod u+w /tftpboot/pxelinux.cfg/default //文件默认只读
[root@rhce ~]# vim /tftpboot/pxelinux.cfg/default
default linux
prompt 1
timeout 6 //超时时间,默认600,可以不改。
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append initrd=initrd.img ks=ftp://192.168.1.8/ks.cfg //ks.cfg是kickstart安装配置文件,系统就是按照ks.cfg来安装的。我们将在后面配置他
......下面省略
------------------------------------------------

四、安装配置DHCP服务:

1、安装DHCP服务:
------------------------------------------------
[root@rhce ~]# yum list dhcp*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
dhcpv6-client.i386 1.0.10-16.el5  installed
Available Packages
dhcp.i386 12:3.0.5-18.el5         cdrom
dhcp-devel.i386 12:3.0.5-18.el5   cdrom
dhcpv6.i386 1.0.10-16.el5         cdrom
[root@rhce ~]# yum install dhcp.i386 dhcp-devel.i386 -y
--------------------------------------------------
2、生成主配置文件dhcpd.conf:
--------------------------------------------------
[root@rhce ~]# rpm -ql dhcp | more
......前面省略
/usr/share/doc/dhcp-3.0.5/api+protocol
/usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample
......后面省略
[root@rhce ~]# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
cp:是否覆盖“/etc/dhcpd.conf”? y
--------------------------------------------------
3、修改主配置文件dhcpd.conf
--------------------------------------------------
[root@rhce ~]# vim /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 { //所属网段及掩码。
# --- default gateway
option routers 192.168.1.8; //路由器IP,可以写网关IP
option subnet-mask 255.255.255.0;
filename "pxelinux.0"; //PXE得到IP以后的引导文件
next-server 192.168.1.8; //服务器IP地址。
# option nis-domain "domain.org";    //注销
# option domain-name "domain.org";   //注销
option domain-name-servers 192.168.1.8; //DNS服务器IP
option time-offset -18000; # Eastern Standard Time
# option netbios-node-type 2;
range dynamic-bootp 192.168.1.100 192.168.1.200; //IP地址池范围。
default-lease-time 21600;
......后面省略 //写配置文件的时候注意每句后面的分号(;)不要丢了。
---------------------------------------------------
4、启动DHCP服务:如果启动错误检查/var/log/message
---------------------------------------------------
[root@rhce ~]# service dhcpd restart
启动 dhcpd: [确定]
---------------------------------------------------
五、kickstart配置文件的生成:
1、安装kickstart包:
---------------------------------------------------
[root@rhce ~]# yum list *kic*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Available Packages
pykickstart.noarch 0.43.3-1.el5 cdrom
system-config-kickstart.noarch 2.6.19.8-2.el5 cdrom
[root@rhce ~]# yum install system-config-kickstart.noarch
---------------------------------------------------
2、生成ks.cfg安装配置文件:
1)图形化界面配置:(终端中运行system-config-kickstart命令)

图一:基本配置里要修改的项目

图二:安装方法里要修改的项目

图三:分区信息,创建目标工作站的分区表

图四:网络配置,点“添加网络设备”——“确定”

图五:单击“文件——保存文件”单击“保存”
2)修改新生成的ks.cfg文件:我们没有配置安装的软件包,因为系统没有这部分服务。
----------------------------------------------------
[root@rhce ~]# cat /root/anaconda-ks.cfg //安装系统时自动记录的安装信息
......前面省略
%packages
@office
@editors
@text-internet
@gnome-desktop
@dialup
......后面省略 //%pachages 后的部分记录系统安装时的软件包的安装情况,复制下来全部复制到ks.cfg文件后面。
[root@rhce ~]# vim ks.cfg
......前面省略
# Partition clearing information
clearpart --none
key --skip //跳过输入序列号环节
...... 中间省略
%packages //这里及以后的内容是从/root/anaconda-ks.cfg 复制来的
@office
@editors
@text-internet
@gnome-desktop
@dialup
......下面省略
----------------------------------------------------
3、将配置文件复制到制定位置:
我们在/tftpboot/pxelinux.cfg/default文件中曾设置ks=ftp://192.168.1.8/ks.cfg
将文件复制到该位置:
----------------------------------------------------
[root@rhce ~]# cp ks.cfg /var/ftp/ // /var/ftp 目录是VSFTP服务的根目录
----------------------------------------------------
六、复制Linux系统安装文件:
在配置ks.cfg文件时,我们设置的路径为/pub,如图:

------------------------------------------------------
[root@rhce ~]# umount /dev/hdc
[root@rhce ~]# mount /dev/hdc /var/ftp/pub/
mount: block device /dev/hdc is write-protected, mounting read-only
------------------------------------------------------
七、确定相关服务的状态:
------------------------------------------------------
[root@rhce ~]# service iptables stop
清除防火墙规则: [确定]
把 chains 设置为 ACCEPT 策略:filter [确定]
正在卸载 Iiptables 模块: [确定]
[root@rhce ~]# setenforce 0 //关闭selinux
[root@rhce ~]# chkconfig tftp on //TFTP 服务开启命令
[root@rhce ~]# chkconfig dhcpd on
[root@rhce ~]# chkconfig vsftpd on
[root@rhce ~]# service xinetd restart //TFTP服务属于他的子服务
停止 xinetd: [确定]
启动 xinetd: [确定]
[root@rhce ~]# service dhcpd restart
关闭 dhcpd: [确定]
启动 dhcpd: [确定]
[root@rhce ~]# service vsftpd restart
关闭 vsftpd: [确定]
为 vsftpd 启动 vsftpd: [确定]
------------------------------------------------------
八、测试工作站:

跳过DHCP,通过TFTP 开始启动计算机

下面就让他自己启动就好了!出去转一圈回来就 OK了!
配置文件?? 自己配置不就好了!教程里写了......

完整的pdf版下载阅读


  • 上一条:
    RHEL 7.0系统安装配置图解教程
    下一条:
    浅谈RHEL 7中systemctl 的用法(替代service和chkconfig)
  • 昵称:

    邮箱:

    0条评论 (评论内容有缓存机制,请悉知!)
    最新最热
    • 分类目录
    • 人生(杂谈)
    • 技术
    • linux
    • Java
    • php
    • 框架(架构)
    • 前端
    • ThinkPHP
    • 数据库
    • 微信(小程序)
    • Laravel
    • Redis
    • Docker
    • Go
    • swoole
    • Windows
    • Python
    • 苹果(mac/ios)
    • 相关文章
    • 在Linux系统中使用Iptables实现流量转发功能流程步骤(0个评论)
    • vim学习笔记-入门级需要了解的一些快捷键(0个评论)
    • 在centos7系统中实现分区并格式化挂载一块硬盘到/data目录流程步骤(0个评论)
    • 在Linux系统种查看某一个进程所占用的内存命令(0个评论)
    • Linux中grep命令中的10种高级用法浅析(0个评论)
    • 近期文章
    • 智能合约Solidity学习CryptoZombie第三课:组建僵尸军队(高级Solidity理论)(0个评论)
    • 智能合约Solidity学习CryptoZombie第二课:让你的僵尸猎食(0个评论)
    • 智能合约Solidity学习CryptoZombie第一课:生成一只你的僵尸(0个评论)
    • 在go中实现一个常用的先进先出的缓存淘汰算法示例代码(0个评论)
    • 在go+gin中使用"github.com/skip2/go-qrcode"实现url转二维码功能(0个评论)
    • 在go语言中使用api.geonames.org接口实现根据国际邮政编码获取地址信息功能(1个评论)
    • 在go语言中使用github.com/signintech/gopdf实现生成pdf分页文件功能(0个评论)
    • gmail发邮件报错:534 5.7.9 Application-specific password required...解决方案(0个评论)
    • 欧盟关于强迫劳动的规定的官方举报渠道及官方举报网站(0个评论)
    • 在go语言中使用github.com/signintech/gopdf实现生成pdf文件功能(0个评论)
    • 近期评论
    • 122 在

      学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..
    • 123 在

      Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..
    • 原梓番博客 在

      在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..
    • 博主 在

      佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..
    • 1111 在

      佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
    • 2016-11
    • 2017-07
    • 2017-10
    • 2017-11
    • 2018-01
    • 2018-02
    • 2020-03
    • 2020-04
    • 2020-05
    • 2020-06
    • 2021-02
    • 2021-03
    • 2021-04
    • 2021-06
    • 2021-07
    • 2021-08
    • 2021-09
    • 2021-10
    • 2021-11
    • 2021-12
    • 2022-01
    • 2022-03
    • 2022-04
    • 2022-08
    • 2022-11
    • 2022-12
    • 2023-01
    • 2023-02
    • 2023-03
    • 2023-06
    • 2023-07
    • 2023-10
    • 2023-12
    • 2024-01
    • 2024-04
    Top

    Copyright·© 2019 侯体宗版权所有· 粤ICP备20027696号 PHP交流群

    侯体宗的博客