设为首页 收藏本站
查看: 1322|回复: 0

[经验分享] 网络安装Centos redhat及rhel5.3的ks安装

[复制链接]

尚未签到

发表于 2018-5-13 12:16:44 | 显示全部楼层 |阅读模式
网络安装Centos redhatrhel5.3ks安装
一、软件准备
本安装使用用http方式进行所以下载apache并在windows下实现安装

Syslinux下载地址:
http://ftp.ntu.edu.tw/linux/boot/syslinux/2.xx/
tftpd下载地址:
http://tftpd32.jounin.net/tftpd32_download.html

二、创建一个tftp-install
1)把解压后的tfpd文件复制至tftp-install
解压后的syslinux下的pxelinux.0复制至tftp-install
创建pxelinux.cfg bootload目录
目录结构如下图

2)在pxelinux.cfg目录下创建default list 两文件

Default文件内容如下:
DEFAULT centos5.4
DISPLAY pxelinux.cfg/list
PROMPT 1


LABEL centos5.4
  kernel /bootload/centos5.4/vmlinuz
  append initrd=/bootload/centos5.4/initrd.img
  
LABEL rhel5.3
  kernel /bootload/redhat5.3/vmlinuz
  append initrd=/bootload/redhat5.3/initrd.img

LABEL rhel4
  kernel /bootload/redhat4/vmlinuz
  append initrd=/bootload/redhat4/initrd.img


list文件内容如下:
Choose one of the following Linux distributions for your installation:
Name           Distribution   Arch.   Installation media
-------------------------------------------------------------------------
centos5.4  32bit i386  

rhel5.3  32bit i386

rhel4    32bit i386

type the targe as centos5.4 or rhel5.3 or rhel4 and next to install the os ,glod bless!



三、bootload目录下创建centos5.4之类的存放引导文件的目录


如该目录的centos5.4里面放置的文件是从centos5.4光盘中的isolinux目录文件


四、ftp工具设置
1)  开启tftp设置如下图server interface 为本机ip
Ip pool设置与本机ip同一网段
Boot file pxelinux.0

如有多IP点界面的settings设置下bind dhcpbind tftp




五、apache设置下面是我设置的两个安装目录
Alias   /rhel5.3   "D:/OS/RedHat/rhel-server-5.3-i386-dvd"  
<Directory   "D:/OS/RedHat/rhel-server-5.3-i386-dvd">
        Options   MultiViews
        AllowOverride   None
        Order   allow,deny
        Allow   from   all
</Directory>
Alias /rhel4 "D:/OS/RedHat/RHEL4-U4-i386-AS-disc1"
<Directory   "D:/OS/RedHat/RHEL4-U4-i386-AS-disc1">
        Options   MultiViews
        AllowOverride   None
        Order   allow,deny
        Allow   from   all
</Directory>
六、系统安装
设置需要安装系统的机器网络启动

正在获取ip

获取到ip并进入到引导界面

此时输入前面设置的引导字符即可如上面的rhel5.3centos5.4rhel4三种操作系统标签回车后进入引导安装

进入到下图界面时选择http安装

设置http的路径


七、kickstart安装实现

1)可以使用已经安装好的系统例如centosrhel我这边是使用已安装好的rhel5.3系统文件/root/anaconda-ks.cfg,下载过来修改修改即可
保存文件名为ks.cfg,内容如下
# Kickstart file automatically generated by anaconda.

install
url --url http://192.168.203.1/rhel5.3
key --skip
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$ogcIyWqR$zM.sgu7CxUCY2NZOjc1460 #密码为123456
firewall --enabled --port=2222:tcp #端口号改变
authconfig --enableshadow --enablemd5
selinux –disabled #selinux关闭
timezone --utc Asia/Shanghai
bootloader --location=mbr --driveorder=sda
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#下面是使用的经典分区,当然你可以先在一台机器上划好分区后拿来套用
clearpart --linux --drives=sda
part /boot --fstype ext3 --size=100 --ondisk=sda
part swap --size=1024
part / --fstype ext3 --size=100 --grow

#选择需要安装的软件包
%packages
@development-libs
@text-internet
@core
@base
@admin-tools
@development-tools
kexec-tools
fipscheck
device-mapper-multipath
imake
#安装后的一些处理,把ssh的端口号改变,及相关不需要的服务关闭,如果有其它要求自己也可以添加下
%post
/bin/sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config
/sbin/chkconfig yum-updatesd off
/sbin/chkconfig sendmail off
/sbin/chkconfig rpcidmapd off
/sbin/chkconfig rpcgssd off
/sbin/chkconfig portmap off
/sbin/chkconfig nfslock off
/sbin/chkconfig ip6tables off
/sbin/chkconfig bluetooth off
/sbin/chkconfig autofs off

2)  脚本已经准备OK了下面对网络安装的default文件进行修改
把原来的
append initrd=/bootload/redhat5.3/initrd.img
改成:
append ks=http://192.168.203.1/rhel5.3/ks.cfg initrd=/bootload/redhat5.3/initrd.img
参与文章:http://www.ibm.com/developerworks/cn/linux/l-autoinstl/
公司网络限制上传文件了,回头补个附件

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-459497-1-1.html 上篇帖子: redhat下yum的使用 下篇帖子: redhat 5.5 无损 缩小 LVM 空间
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表