Thursday, March 15, 2012

Centos Network Installation Server


REMOTE INSTALLATION
from CENTOS6


Required Packages for Network Installation: -
  • xinetd: -Xinetd-managed applications (like tftp, telnet etc.) all store their configuration files in the /etc/xinetd.d/ directory.
  • tftp-server
  • dhcp
  • syslinux: - pxeboot package
  • nfs

Installation of Required Packages: -
  • xinetd: - yum install xinetd
  • tftp-server: - yum install tftp-server
  • dhcp: - yum install dhcp
  • syslinux: - yum install syslinux

Steps to setup tftpboot: -
  1.  # mkdir /tftpboot/
  2. Create the tftpboot directory under root directory (/)
    Now some changes are required to vi /etc/xinetd.d/tftp

server_args = -s /tftpboot

    After installing the syslinux package, pxelinux.0 file will be created under /usr/share/syslinux/ directory. This is required to load & install kernel and initrd images on the client machine.
Copying the pxelinux.0 image. PXE Linux image will be available once you installed the syslinux package. Copy this  
to /tftpboot path as shown below.
 
# cp /usr/share/syslinux/pxelinux.0 /tftpboot


    Extract the ISO image into a directory which is located into tftpboot.
    # mkdir /centos
    # mount -o loop centos-DVD-x86_64.iso /centos # cp -vr /centos /tftpboot/
    copy the vmlinuz & initrd into /tftpboot.
    # cp /centos/isolinux/ vmlinuz initrd.img /tfptboot

    Create the directory pxelinux.cfg under /tftpboot and define the pxe boot definitions for the client.
# mkdir /tftpboot/pxelinux.cfg
# vi /tftpboot/pxelinux.cfg/default
 

default centos
label centos
kernel vmlinuz
append initrd=initrd.img showopts=nfs
install = nfs://192.168.56.1/tftpboot/centos/

save this file using the command (:x, :wq).
default: - this option specify the default os that is to be install on remote machine. Default option should be same as label.
Label: - here you can specify the label of OS that you are going to install.
Kernel: - here u have to specify the kernel name which you copy in /tftpboot directory.
Showopts (show option): -Through which u share the centos image.
install – specifies boot arguments to pass to the install kernel.



    DHCP server setup: -
    add the following lines in /etc/dhcpd/dhcpd.conf
    Allow booting;
    allow bootp;
    filename “pxelinux.0”
    next-server 192.168.56.1; #specify here server static ip address.

    NFS server setup: -
    vi /etc/exports
/data/packages/centos6 *(rw) #path of to be shared iso extracted image

    restart xinetd, dhcpd, nfs services: -
# service xinetd restart
# service nfs restart
# service dhcpd restart


    SETTING ON CLIENT SIDE: -
    open BIOS on client machine and then set boot device priority to NETWORK.
save it and reboot the system.
    In this way you can install Linux OS on remote machine.
    author
    pardeep taya
    email- bk_pardeep@yahoo.co.in

No comments:

Post a Comment