Difference between revisions of "Cluster der kan alt/Kickstart fil til installation af noder"

From Teknologisk videncenter
Jump to: navigation, search
(Kickstart fil)
(Kickstart fil)
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
*Der skal anvendes en http: server således at noderne kan hente kickstart filen. Anvend for ekempel '''lighttpd'''
 
*Der skal anvendes en http: server således at noderne kan hente kickstart filen. Anvend for ekempel '''lighttpd'''
 +
<source lang=cli>
 +
sudo apt-get install lighttpd
 +
</source>
 
*For at lave kickstart filer kan i ''håndlave'' dem i en editor eller anvende '''system-config-kickstart'''
 
*For at lave kickstart filer kan i ''håndlave'' dem i en editor eller anvende '''system-config-kickstart'''
 +
 +
For at bruge '''system-config-kickstart''' skal du installere det med kommando'en
 +
<source lang=cli>
 +
sudo apt-get install system-config-kickstart
 +
</source>
 +
 +
For at du kan bruge '''sytem-config-kickstart''' skal du have installeret Xming på din windows pc. Du kan hente Xming på dette link:
 +
http://sourceforge.net/projects/xming/
 +
 +
==Putty Opsætning==
 +
[[File:Putty-Xming-setup.png|350px]]
 +
 +
==System-config-kickstart==
 +
 +
Kør Kommando'en nedenfor for at starte med at lave din kickstart fil.
 +
 +
<source lang=cli>
 +
system-config-kickstart
 +
</source>
 +
:#så får du et grafisk window pop up til opsætning af en kickstart fil
 +
 +
 +
'''Filenplacering'''
 +
<source lang=cli>
 +
/var/www/ks.cfg
 +
</source>
  
 
==Kickstart fil==
 
==Kickstart fil==
Line 28: Line 57:
 
install
 
install
 
#Use Web installation
 
#Use Web installation
url --url http://10.0.0.1:3142/ubuntu/
+
url --url http://mirror.tekkom.dk/ubuntu/
 
#System bootloader configuration
 
#System bootloader configuration
 
bootloader --location=mbr
 
bootloader --location=mbr
Line 75: Line 104:
 
#!/bin/bash
 
#!/bin/bash
 
echo "Pre-installation"
 
echo "Pre-installation"
 +
#Hostname, Dette script sætter hostname hvis den kan lave en reverse lookup på fra DNS, hvis DHCP er sat up
 +
IP=$(hostname -I | awk '{print $1}')
 +
Host=$(host $IP | awk '{print $5}' | cut -d '.' -f1)
 +
if test $? == 0
 +
then
 +
echo $Host > /etc/hostname
 +
fi
 +
#Hostname END
 
%post --nochroot
 
%post --nochroot
echo "portmap : 10.0.0.1" >> /etc/hosts.allow
+
echo "portmap : 10.0.0.1" >> /target/etc/hosts.allow
echo "+::::::" >> /etc/passwd
+
echo "ypserver 10.0.0.1" >> /target/etc/yp.conf
echo "+:::" >> /etc/group
+
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab
echo "+::::::::" >> /etc/shadow
+
mkdir /target/mnt/tmp
echo "ypserver 10.0.0.1" >> /etc/yp.conf
+
echo "10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0" >> /target/etc/fstab
/etc/init.d/nis restart
+
echo "10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0" >> /target/etc/fstab
mkdir /mnt/temp
+
/target/etc/init.d/nis restart
mount -o nolock 10.0.0.1:/script/ /mnt/temp
 
open -s -w -- /script/runme
 
umount /mnt/temp
 
 
</source>
 
</source>
  

Latest revision as of 09:22, 31 October 2014

  • Der skal anvendes en http: server således at noderne kan hente kickstart filen. Anvend for ekempel lighttpd
sudo apt-get install lighttpd
  • For at lave kickstart filer kan i håndlave dem i en editor eller anvende system-config-kickstart

For at bruge system-config-kickstart skal du installere det med kommando'en

sudo apt-get install system-config-kickstart

For at du kan bruge sytem-config-kickstart skal du have installeret Xming på din windows pc. Du kan hente Xming på dette link: http://sourceforge.net/projects/xming/

Putty Opsætning

Putty-Xming-setup.png

System-config-kickstart

Kør Kommando'en nedenfor for at starte med at lave din kickstart fil.

system-config-kickstart
  1. så får du et grafisk window pop up til opsætning af en kickstart fil


Filenplacering

/var/www/ks.cfg

Kickstart fil

#Generated by Kickstart Configurator
#platform=x86

#System language
lang da_DK
#Language modules to install
langsupport da_DK
#System keyboard
keyboard dk
#System mouse
mouse
#System timezone
timezone Europe/Copenhagen
#Root password
rootpw --iscrypted $1$AkUb1qdI$vMYeX3C37RX0pRjBppX7W.
#Initial user
user cluster --fullname "cluster admin" --iscrypted --password $1$9Za4QvWX$AXgp$
#Reboot after installation
reboot
#Use text mode install
text
#Install OS instead of upgrade
install
#Use Web installation
url --url http://mirror.tekkom.dk/ubuntu/
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#Partition clearing information
clearpart --all --initlabel
#Disk partitioning information
part / --fstype ext4 --size 1024
part /boot --fstype ext4 --size 512
part /home --fstype ext4 --size 1024
part /var --fstype ext4 --size 3072
part /tmp --fstype ext4 --size 3072
part /usr --fstype ext4 --size 5120
part swap --size 1024
#System authorization infomation
auth  --useshadow  --enablemd5  --enablenis --nisdomain dka.local --nisserver 1$
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
#Package install information
%packages
openssh-server
nmap
ssh
screen
bmon
iperf
bonnie++
lmbench
lm-sensors
snmpd
snmp
build-essential
gcc
openssh-client
nfs-common
mpich2
dsh
portmap
nis
%pre
#!/bin/bash
echo "Pre-installation"
#Hostname, Dette script sætter hostname hvis den kan lave en reverse lookup på fra DNS, hvis DHCP er sat up
IP=$(hostname -I | awk '{print $1}')
Host=$(host $IP | awk '{print $5}' | cut -d '.' -f1)
if test $? == 0
then
echo $Host > /etc/hostname
fi
#Hostname END
%post --nochroot
echo "portmap : 10.0.0.1" >> /target/etc/hosts.allow
echo "ypserver 10.0.0.1" >> /target/etc/yp.conf
perl -pi -w -e 's/\/home/\/home.old/g;' /target/etc/fstab
mkdir /target/mnt/tmp
echo "10.0.0.1:/home /home nfs rw,bg,hard,intr 0 0" >> /target/etc/fstab
echo "10.0.0.1:/script /mnt/tmp/ nfs rw,bg,hard,intr 0 0" >> /target/etc/fstab
/target/etc/init.d/nis restart

Sådan ser vores gældende Kickstart fil ud