網絡系統安裝部署

一  安裝

 yum -y install dhcp tftp-* vsftpd pykickstart-*

二 配置 dhcpd.conf

  vim /etc/dhcpd.conf

ddns-update-style interim;
ignore client-updates;

subnet 192.168.18.0 netmask 255.255.255.0 {

 

     option routers 192.168.18.1;
     option subnet-mask  255.255.255.0;
     option domain-name-servers 192.168.18.153;


     range dynamic-bootp 192.168.18.100 192.168.18.200;
     default-lease-time 21600;
     max-lease-time 21600;
     filename "pxelinux.0";
     next-server 192.168.18.153;
}


三 啓動

  service dhcpd restart

[root@localhost ~]# service dhcpd restart
關閉 dhcpd:                                               [確定]
啓動 dhcpd:                                               [確定]

四 配置  tftp
 
   vim /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             = -s /tftpboot
        disable                 = no
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

 
 [root@localhost ~]# cd /tftpboot/
 [root@localhost ~]# cd /usr/lib/syslinux/
 [root@localhost ~]# cp pxelinux.0 /tftpboot/
 [root@localhost ~]# cd /mnt/isolinux/
 [root@localhost ~]# cp vmlinuz /tftpboot/
 [root@localhost ~]# cp initrd.img /tftpboot/
[root@localhost tftpboot]# ls
initrd.img  menu.c32  pxelinux.0  pxelinux.cfg  vmlinuz

 [root@localhost ~]# mkdir /tftpboot/pxelinux.cfg
 
 [root@localhost ~]# cp isolinux.cfg /tftpboot/pxelinux.cfg/
 [root@localhost ~]# cd pxelinux.cfg/
 [root@localhost ~]# mv isolinux.cfg default
 [root@localhost ~]# cd pxelinux.cfg/
 
配置 
 [root@localhost ~]# vim default

default menu.c32
#prompt 1
timeout 600

MENU TITLE welcome to wangbo.

label linux
  kernel vmlinuz
  append initrd=initrd.img
label text
  kernel vmlinuz
  append initrd=initrd.img text
label ks
  kernel vmlinuz
  append ks initrd=initrd.img ks=ftp://192.168.18.153/ks.cfg
label local
  localboot 1
label memtest86
  kernel memtest
  append -
                                         
 安裝圖形kickstart
 
  [root@localhost ~]# yum install -y system-config-kickstart
  [root@localhost ~]# system-config-kickstart


  [root@localhost ~]# cp /root/ks.cfg /var/ftp/
  [root@localhost ~]#  chmod 644 ks.cfg
  [root@localhost ~]# service vsftpd restart
關閉 vsftpd:                                              [確定]
爲 vsftpd 啓動 vsftpd:                                    [確定]

 [root@localhost ftp]# service xinetd restart
停止 xinetd:                                              [確定]
啓動 xinetd:                                              [確定]


掛載

  [root@localhost ~]#mount /dev/hdc /var/ftp/pub/
  [root@localhost ~]#mount
[root@localhost ~]# mount /dev/cdrom /var/ftp/pub/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/hdc on /media/RHEL_5.5 i386 DVD type iso9660 (ro,noexec,nosuid,nodev,uid=0)
/dev/hdc on /mnt type iso9660 (ro)
/dev/hdc on /var/ftp/pub type iso9660 (ro)
 

 

測試

 

 
 
 
 

 

 

 

安裝成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章