linux——(1)linux系统的无人值守安装



 

 

Kickstart

如果是Centos7系统的话,client端内存必须保证2G以上

首先确认selinux是不是关闭了

一.安装列出来的rpm包

1.安装dhcp服务器

# rpm -qa |grep dhcp

dhcp-4.1.1-34.P1.el6.centos.i686

dhcp-common-4.1.1-34.P1.el6.centos.i686

//dhcp-devel-4.1.1-34.P1.el6.centos.i686

 

 

2.安装TFTP服务器 

# rpm -qa |grep tftp

tftp-server-0.49-7.el6.i686

安装时可能出现xinetd is needed by tftp-server-0.49-7.el6.i686

则需安装xinetd

# rpm -qa |grep xinetd

xinetd-2.3.14-38.el6.i686

 

 

3.安装VSFTP服务器

# rpm -qa |grep vsftp

vsftpd-2.2.2-11.el6_3.1.i686

 

4.安装kickstart

# rpm -qa |grep system-config-kickstart

system-config-kickstart-2.8.6.5-1.el6.noarch

建议用yum安装 

yum install -y system-config-kickstart

 

二.修改服务器配置文件

1.Dhcp

2.Tftp

3.ftp

4.default

5.Ks.cfg

 

三.准备工作:

 

-------------------------------本地IP地址--------------------------------

[root@catt ~]# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:A4:F2:56 

          inet addr:192.168.133.148  Bcast:192.168.133.255  Mask:255.255.255.0

          inet6 addr: fe80::20c:29ff:fea4:f256/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:259915 errors:0 dropped:0 overruns:0 frame:0

          TX packets:565798 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:17213848 (16.4 MiB)  TX bytes:812666141 (775.0 MiB)

-------------------------------本地IP地址--------------------------------

首先要把镜像中的所有文件cp到/var/ftp/pub文件下

mkdir -pv /tftpboot/pxelinux.cfg

cp /usr/share/syslinux/pxelinux.0 /tftpboot/

cp /var/ftp/pub/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/default

cp /var/ftp/pub/images/pxeboot/initrd.img /tftpboot

cp /var/ftp/pub/images/pxeboot/vmlinuz /tftpboot

cp /usr/share/syslinux/vesamenu.c32 /tftpboot/

chmod 644 /tftpboot/pxelinux.cfg/default

 

四.配置文件参数

1. vi /etc/dhcp/dhcpd.conf

#

# DHCP Server Configuration file.

#   see /usr/share/doc/dhcp*/dhcpd.conf.sample

#   see 'man 5 dhcpd.conf'

#

ddns-update-style interim;

ignore client-updates;

subnet 192.168.133.0 netmask 255.255.255.0 {

  option routers 192.168.133.100;

  option subnet-mask 255.255.255.0;

  filename "/pxelinux.0";

  next-server 192.168.133.148;

  option domain-name-servers 192.168.133.148;

  range dynamic-bootp 192.168.133.20 192.168.133.40;

  default-lease-time 14400;

  max-lease-time 28800;

}

 

2.vi /etc/xinetd.d/tftp

# default: off

# description: The tftp server serves files using the trivial file transfer \

#       protocol.  The tftp protocol is often used to boot diskless \

#       workstations, download configuration files to network-aware printers, \

#       and to start the installation process for some operating systems.

service tftp

{

        socket_type             = dgram

        protocol                = udp

        wait                    = yes

        user                    = root

        server                  = /usr/sbin/in.tftpd

        server_args             = -u nobody -s /tftpboot

        disable                 = no

        per_source              = 11

        cps                     = 100 2

        flags                   = IPv4

}

 

3.vi /etc/vsftp/vsftpd.conf

无需改动

4.vi /tftpboot/pxelinux.cfg/default 

label linux

menu label ^Install or upgrade an existing system

menu default

kernel vmlinuz

append initrd=initrd.img ks=ftp://192.168.133.148/ks.cfg

--------------开机必须启动的选项---------------

service iptables stop

chkconfig iptables off

service vsftpd start

chkconfig vsftpd on

service xinetd start

chkconfig xinetd on

service dhcpd start

chkconfig dhcpd on

 

-------------------------------------------------

5. /var/ftp/ks.cfg    (注意权限此建议755)

6.生成ks.cfg文件

root用户执行

system-config-kickstart命令

这一步需要和项目组的确认各个磁盘大小:

 

完成之后就可以开始启动了:

开启的另一太机器自动找到

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值