Linux- Kickstart Based Installation
KickStart provides a way for users to automate a Red Hat Enterprise Linux installation.
Here are simple steps:
1.Install Apache.
[root@ranjith ~]# rpm -qa |grep -i httpd
[root@ranjith ~]# yum -y install httpd
[root@ranjith ~]# lsof -i tcp:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 10787 root 4u IPv6 223062 0t0 TCP *:http (LISTEN)
httpd 10789 apache 4u IPv6 223062 0t0 TCP *:http (LISTEN)
httpd 10790 apache 4u IPv6 223062 0t0 TCP *:http (LISTEN)
2. Create a install root where we gonna installing the contents of the cdrom to, We can use under default document root in /var/www/html.
[root@ranjith ~]# cd /var/www/html/
[root@ranjith html]# mkdir centos5
[root@ranjith html]# cd centos5/
[root@ranjith centos5]# pwd
/var/www/html/centos5
3. Download and mount the centos ISO file from: centos.org
Here i download: CentOS-6.4-x86_64
4. Mount the iso you downloaded to a mount point.
[root@ranjith mnt]# mount -o loop CentOS-6.4-x86_64-bin-DVD1.iso /mnt
[root@ranjith mnt]# du -sch /mnt
4.1G /mnt
4.1G total
5. Copy the contents of the iso into the directory you created.
[root@ranjith mnt]# cp -var /mnt/* /var/www/html/centos5/
6. Create a directory to house your kickstart configurations under Apache’s default document root of /var/www/html
[root@ranjith html]# mkdir kstart
[root@ranjith html]# cd kstart/
[root@ranjith kstart]# pwd
/var/www/html/kstart
7. Create the kickstart configuration file, kstart.cfg under kstart directroy. In kstart.cfg file kindlly place the below code.
#text-based insatllation.
text
install
url --url http://YOUR-SERVER-IP/centos5 // server-IP here
lang en_US.UTF-8
keyboard us
langsupport --default=en_US.UTF-8 en_US.UTF-8
network --device eth0 --bootproto dhcp
rootpw --iscrypted $1$/ABCabcABC/ // Password here
firewall --disabled
selinux --disabled
authconfig --enableshadow --enablemd5
timezone America/New_York
bootloader --location=mbr --append="console=xvc0"
# basic root, boot, swap partitioning here
zerombr yes
clearpart --all
part /boot --asprimary --fstype="ext3" --size=100 --bytes-per-inode=4096
part swap --asprimary --fstype="swap" --recommended --bytes-per-inode=4096
part / --asprimary --fstype="ext3" --grow --size=1 --bytes-per-inode=4096
reboot
# Utilities here
%packages --nobase
authconfig
crontabs
kbd
kudzu
man
ntp
openssh-clients
openssh-server
passwd
pciutils
rootfiles
rpm
system-config-securitylevel-
traceroute
yum
yum-updatesd
vim-minimal
vixie-cron
which
wget
unzip
kudzu
man
ntp
openssh-clients
openssh-server
passwd
pciutils
rootfiles
rpm
system-config-securitylevel-
traceroute
yum
yum-updatesd
vim-minimal
vixie-cron
which
wget
unzip
sudo
%post
(
chkconfig --level 3 ip6tables off
chkconfig --level 3 kudzu off
chkconfig --level 3 netfs off
chkconfig --level 3 yum-updatesd off
#
useradd -p 'webmaster' someotheruser
) 2>&1 | tee /root/post-install.log
8. Use the dvd you downloaded or grab a copy of the boot.iso from the install root. You can either use the install DVD iso you or use the 10MB boot.iso located in centos5/images/boot.iso I choose to use the boot.iso since its 10MB and is easily distributable.
9. start the web-server.
[root@ranjith html]# /etc/init.d/httpd start
Starting httpd:
10. Boot the system with boot.iso or install DVD. On the boot prompt enter:
linux ks=http://your_kickstart_ip/
cheers!!!
Comments
Post a Comment