Network installation linux

  
        

First, install tftp on another server tftp-server ftp hdcp

yum install tftp tftp-server vsftpd dhcp -y

During the installation process, the dependencies are automatically checked and automatically Xinetd (super daemon) installation

Second, configure xinetd

vim /etc/xinetd.d/tftp Open tftp configuration file to see disable default to Yes to change it to no, There are two ways: directly edit the file or

to exit first, chkconfig tftp off

3. Mount the iso image

umount /media/RHEL_6.4\\ x86_64\\ Disc \\ 1/CD image is mounted to /media by default, so uninstall it first

cd /var/ftp/pub/

mkdir dvd

mount /dev/cdrom /var /ftp/pub/dvd

4. Extract the subsystems needed to install the system from the iso image

cd /var/ftp/pub/dvd into iso

cd Isolinux enter isolinux

cp initrd.img vesamenu.c32 vmlinuz isolinux.cfg splash.jpg /var/lib/tftpboot/Copy these files to /var/lib/tftpboot/

cd /var/lib/tftpboot/

mkdir Pxelinux.cfg

cp isolinux.cfg pxelinux.cfg/default

rm -rf isolinux.cfg

Install syslinux :

Configure yum library first:

vim /etc/yum.repos.d/dvd.repo

File Content:

[DVD] name=DVD baseurl=file:///var/ftp /pub/dvd gpgcheck=0

yum clean all Empty yum library

yum install syslinux -y

cp /usr/share/syslinux/pxelinux.0 /var/Lib/tftpboot/will small image cp to tftpboot directory

To install linux small system ready to complete

V. Configure dhcp

vim /etc/dhcp/dhcpd. Conf

File contents:

option domain-name "example.com"; default-lease-time 600; max-lease-time 7200;

log-facility Local7;

subnet 192.168.4.0 netmask 255.255.255.0{

range 192.168.4.30 192.168.4.50;

filename "pxelinux.0"; #File to be transferred Next-server 192.168.4.103; #Next server, fill in the local address }

#Note 192.168.4.0 this network segment should be on the same network segment as your server (this machine)

/etc/init.d/dhcp d restart Start dhcp service

VI. Turn on the service to turn off the firewall

service xinetd start

iptable -F

setenforce 0

Create an empty virtual machine and open

to select the bridge! !

Normally, you can see the dhcp allocation address. After tftp transfers the file, you can see the installation interface.

Eight, automatic installation through the answer file

yum install system-config-kickstart.noarch -y installation system-config-kickstart.noarch

system-config-kickstart open This program

Need special instructions:

installation method in installlation source select ftp configuration address: ftp://192.168.4.103#ftp server address (native)

Table of Contents: pub/dvd

Click save to save to desktop

cd ~

cpdesktop/ks.cfg /var/ftp/pub/

Vim /var/lib/tftpboot/pxelinux.cfg/default

Add after append initrd=initrd.img under the menu label ^Install or upgrade an existing system:

ks= Ftp://192.168.4.103/pub/ks.cfg

Save and exit

IX. Start a new virtual machine and select the first installation phase to start automatic installation

Copyright © Windows knowledge All Rights Reserved