Install CentOS 6.5 Using Kickstart Method

by
Share this Article: Facebook0Google+0Twitter17LinkedIn1Reddit0StumbleUpon1

Installing Linux can be done via multiple methods like (DVD/ftp/http/NFS/), but the easiest way is from kickstart file. Its very easy, and fast method.

Before you begin:

Set Selinux to permissive.

Allow ftp port 21 on iptables.

Install vsftp and dhcp Server

yum install vsftpd
yum install dhcp

Kickstart file rhel.cfg:

# sample kickstart file

install
text
url --url=ftp://192.168.1.101/pub/dvd/  ##  DHCP/FTP  Server  IP  
key --skip
lang en_US.UTF-8
keyboard us

network --onboot yes --device eth0 --bootproto dhcp

reboot
rootpw --iscrypted $1$LBRQpyfo$MunJCNH0oMkO29Vv5.ZEc/  #password(000000)

firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone --utc EuropeAmsterdam

bootloader --location=mbr --append="rhgb quiet"

clearpart --linux --drives=sda
part / --fstype ext4 --size=5400  #5.4GB
part /boot --fstype ext4 --size=100
part swap --size=2000  #2GB

%packages --nobase
@core
%post

 DHCP Configuration

dhcpd.conf.

# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'
#
ddns-update-style none;
subnet 10.1.1.0 netmask 255.255.255.0 {      # chcek your  submet from your  netwrok 

        option routers  10.1.1.1;     #gatwway 
        option subnet-mask 255.255.255.0;
        option domain-name "example.com";
        option domain-name-servers 10.1.1.13, 10.1.1.14;    #put here   your  DNS  servers   from /etc/resolv.conf 
        default-lease-time 21600;
        max-lease-time 43200;

        pool {

                range   10.1.1.141 10.1.1.148;
        }

        next-server dnsserver;
}
#

Now:

Copy rhel.cfg to /var/ftp/pub/, and copy dhcpd.conf to /etc/dhcp/ directory.

Restart dhcpd and vsftpd services.

/etc/init.d/vsftpd restart
/etc/init.d/dhcpd restart

Extract the ISO to the FTP directory.

mount /dev/Centos6.5.iso /mnt
mkdir -p /var/ftp/pub/DVD
cp -pvR /mnt/* /var/ftp/pub/DVD

Now start installing the new system.

Insert the CentOS installation DVD. From the boot install menu, hit esc key on the keyboard.

You will get boot prompt as shown below.

boot:

type the following command in the boot prompt.

linux ks=ftp://dhcp-ftp-server-ip-address/rhel.cfg

That’s it.

For questions please refer to our Q/A forum at : http://ask.unixmen.com/


Share this Article: Facebook0Google+0Twitter17LinkedIn1Reddit0StumbleUpon0