FAI INSTALL FAQ AUF DEBIAN SQUEEZE: Unterschied zwischen den Versionen
KKeine Bearbeitungszusammenfassung |
K (Schützte „FAI INSTALL FAQ AUF DEBIAN SQUEEZE“ ([edit=sysop] (unbeschränkt) [move=sysop] (unbeschränkt))) |
(kein Unterschied)
|
Aktuelle Version vom 29. April 2013, 20:02 Uhr
FAI INSTALL FAQ AUF DEBIAN SQUEEZE (Stand 05.07.2011) [ © OppTupacShakur | http://OPPServer.net | http://unix.oppserver.net ]
Hier unsere Server/Client Beispiele dieser Anleitung:
FAI Server, Debian Squeeze 6.0x, IP 192.168.39.2, Hostname fai Client 1, MAC Adresse 08:00:22:22:22:21, IP 192.168.39.226, Hostname debian-squeeze-1 Router, IP 192.168.39.253, Hostname router
Als erstes als User root einloggen:
sudo -s
oder
su
Die Clients in /etc/hosts eintragen, wird fuer den PXE Boot benoetigt:
echo "192.168.39.226 debian-squeeze-1" >> /etc/hosts
Folgende Packete installieren:
aptitude install fai-client fai-doc fai-server fai-quickstart atftpd dhcp3-server xinetd syslinux nfs-kernel-server apt-move makepasswd apache2 apt-cacher
Als erstes erstellen wir den apt-cacher:
apache2ctl graceful
In /etc/default/apt-cacher setzen wir AUTOSTART=1
In /etc/apt-cacher/apt-cacher.conf koennen wir noch Anpassungen machen.
Danach starten wir den apt-cacher Daemon
/etc/init.d/apt-cacher restart
Nun das Script debian-squeeze-fai-i386-amd64-config-script downloaden und ausfuehren:
wget http://unix.oppserver.net/debian/fai/debian-squeeze-fai-i386-amd64-config-script chmod +x debian-squeeze-fai-i386-amd64-config-script ./debian-squeeze-fai-i386-amd64-config-script rm debian-squeeze-fai-i386-amd64-config-script
Jetzt das FAI root Passwort (FAI_ROOTPW) erzeugen:
makepasswd --crypt-md5
In /etc/fai-i386/make-fai-nfsroot.conf folgendes aendern/ersetzen/hinzufuegen:
NFSROOT=/srv/fai/nfsroot-i386 FAI_ROOTPW='...' FAI_DEBOOTSTRAP_OPTS="--arch i386" APT_CONFIG=/etc/fai-i386/apt_arch.conf
In /etc/fai-amd64/make-fai-nfsroot.conf folgendes aendern/ersetzen/hinzufuegen:
NFSROOT=/srv/fai/nfsroot-amd64 FAI_ROOTPW='...' FAI_DEBOOTSTRAP_OPTS="--arch amd64" APT_CONFIG=/etc/fai-amd64/apt_arch.conf
In /etc/fai/make-fai-nfsroot.conf folgendes aendern/ersetzen/hinzufuegen:
FAI_ROOTPW='...'
In /etc/fai/fai.conf folgendes aendern/ersetzen/hinzufuegen:
FAI_CONFIG_SRC=nfs://192.168.39.2/srv/fai/config LOGUSER=fai
Benoetigte Ordner erstellen:
mkdir -p /srv/fai/mirror/i386/debian-squeeze mkdir -p /srv/fai/mirror/amd64/debian-squeeze mkdir -p /srv/fai/nfsroot-i386 mkdir -p /srv/fai/nfsroot-amd64
In /etc/exports folgendes aendern/ersetzen/hinzufuegen:
/srv/fai/config 192.168.39.0/24(async,ro,no_subtree_check) /srv/fai/nfsroot-i386 192.168.39.0/24(async,ro,no_subtree_check,no_root_squash) /srv/fai/nfsroot-amd64 192.168.39.0/24(async,ro,no_subtree_check,no_root_squash) /srv/fai/mirror/i386/debian-squeeze 192.168.39.0/24(async,ro,no_subtree_check,no_root_squash) /srv/fai/mirror/amd64/debian-squeeze 192.168.39.0/24(async,ro,no_subtree_check,no_root_squash)
Und den NFS Server restarten:
/etc/init.d/nfs-kernel-server restart
Eine neue sources.list downloaden:
mv /etc/fai/apt/sources.list /etc/fai/apt/sources.list.orig wget http://unix.oppserver.net/debian/sources.list.squeeze -O /etc/fai/apt/sources.list.squeeze
Diese nun mit folgendem ergaenzen:
#Apt-Cacher deb http://192.168.39.2/apt-cacher/ftp.debian.org/debian/ squeeze contrib main non-free deb-src http://192.168.39.2/apt-cacher/ftp.debian.org/debian/ squeeze contrib main non-free deb http://192.168.39.2/apt-cacher/security.debian.org/ squeeze/updates main contrib non-free deb-src http://192.168.39.2/apt-cacher/security.debian.org/ squeeze/updates main contrib non-free deb http://192.168.39.2/apt-cacher/backports.debian.org/debian-backports squeeze-backports main contrib non-free deb-src http://192.168.39.2/apt-cacher/backports.debian.org/debian-backports squeeze-backports main contrib non-free deb http://192.168.39.2/apt-cacher/deb.opera.com/opera/ squeeze non-free deb http://192.168.39.2/apt-cacher/debian-multimedia.informatik.uni-erlangen.de/debian-multimedia/ squeeze main non-free deb-src http://192.168.39.2/apt-cacher/debian-multimedia.informatik.uni-erlangen.de/debian-multimedia/ squeeze main deb http://192.168.39.2/apt-cacher/www.lamaresh.net/apt squeeze main deb http://192.168.39.2/apt-cacher/download.virtualbox.org/virtualbox/debian squeeze contrib non-free deb http://192.168.39.2/apt-cacher/download.webmin.com/download/repository sarge contrib deb http://192.168.39.2/apt-cacher/download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./ deb http://192.168.39.2/apt-cacher/www.prodeia.de/mms/squeeze binary/ deb-src http://192.168.39.2/apt-cacher/www.prodeia.de/mms source/ deb http://192.168.39.2/apt-cacher/debian.oppserver.net/debian squeeze contrib main non-free deb-src http://192.168.39.2/apt-cacher/debian.oppserver.net/debian squeeze contrib main non-free deb http://192.168.39.2/apt-cacher/debian.oppserver.net/xbmc/ squeeze main non-free contrib deb-src http://192.168.39.2/apt-cacher/debian.oppserver.net/xbmc/ squeeze main non-free contrib deb http://192.168.39.2/apt-cacher/debian.oppserver.net/enna squeeze main non-free contrib deb-src http://192.168.39.2/apt-cacher/debian.oppserver.net/enna squeeze main non-free contrib
In /etc/fai/NFSROOT bei "PACKAGES aptitude" folgendes hinzufuegen:
live-initramfs initramfs-tools vim
In /etc/fai/NFSROOT bei "PACKAGES aptitude I386" folgendes ersetzen:
linux-image-2.6-686 linux-headers-2.6-686
In /etc/fai/NFSROOT bei "PACKAGES aptitude AMD64" folgendes hinzufuegen:
linux-headers-2.6-amd64
Kopieren der default Config (z.B. /srv/fai/config/disk_config fuer die Partitionierung):
cp -a /usr/share/doc/fai-doc/examples/simple/* /srv/fai/config/
Konfigurieren der eigenen Pakete die installiert werden sollen, in /srv/fai/config/package_config/OWN folgendes hinzufuegen:
PACKAGES aptitude sudo gcc g++ make zip bzip2 unzip psmisc libc6 libc6-dev unrar kde-full kde-i18n-de kde-l10n-de kdm xserver-xorg iceweasel iceweasel-l10n-de opera flashplugin-nonfree wine subversion subversion-tools cvs mercurial webmin ssh proftpd-basic samba smbfs smbclient nfs-common nfs-kernel-server sendmail telnetd smbldap-tools k3b k3b-i18n
cdrdao dvd+rw-tools libdvdcss2 openssl cryptsetup
sun-java6-jdk sun-java6-plugin
xine-ui mplayer mencoder kmplayer mplayer-skin-blue amarok libxvidcore4 libxvidcore4-dev avifile-xvid-plugin xvid4conf vlc ffmpeg faad faac libfaac-dev liba52-0.7.4 liba52-0.7.4-dev lame libogg-dev libtheora-dev libvorbis-dev alsa-base alsa-oss alsa-tools alsa-utils alsa-source libx264-dev libmp4v2-dev libid3tag0-dev libmad0-dev libsndfile1-dev libflac-dev libasound2-dev openoffice.org openoffice.org-help-de openoffice.org-hyphenation-de openoffice.org-l10n-de openoffice.org-thesaurus-de-ch openoffice.org-thesaurus-de openoffice.org-kde ttf-mscorefonts-installer ttf-bitstream-vera ttf-freefont ttf-junicode sun-java6-fonts ttf-xfree86-nonfree
Konfigurieren der default Config, in /srv/fai/config/class/50-host-classes folgendes ersetzen:
*) echo "FAIBASE DHCPC GERMAN OWN" ;;
Nun kommen wir zum erstellen des FAI NFSroot und des FAI Mirrors fuer i386 (wird auch zum update ausgefuehrt):
export FAI_DEBMIRROR=192.168.39.2:/srv/fai/mirror/i386/debian-squeeze export FAI_ETC_DIR=/etc/fai-i386 export APT_CONFIG=/etc/fai-i386/apt_arch.conf aptitude update fai-setup -C /etc/fai-i386 -v fai-mirror -C /etc/fai-i386 -v /srv/fai/mirror/i386/debian-squeeze make-fai-nfsroot -C /etc/fai-i386 -v export -n APT_CONFIG FAI_ETC_DIR FAI_DEBMIRROR aptitude update
In /srv/fai/nfsroot-i386/live/filesystem.dir/etc/initramfs-tools/initramfs.conf folgendes ersetzen:
KEYMAP=y BOOT=nfs
chroot /srv/fai/nfsroot-i386/live/filesystem.dir /bin/bash --login mount -t proc none /proc/ update-initramfs -k all -u umount /proc/ exit
mkdir /srv/tftp/fai/ cd /srv/fai/nfsroot-i386/live/filesystem.dir/boot/ cp initrd.img-2.6.32-*-686 /srv/tftp/fai/ cp vmlinuz-2.6.32-*-686 /srv/tftp/fai/
Nun konfigurieren wir PXE:
mkdir /srv/tftp/fai/pxelinux.cfg
fai-chboot -k "initrd=$(ls -rt /srv/tftp/fai/initrd.img*686* | tail -1 | sed 's;.*/;;') ip=dhcp root=/dev/nfs nfsroot=192.168.39.2:/srv/fai/nfsroot-i386 boot=live FAI_FLAGS=verbose,sshd,createvt,reboot FAI_ACTION=install panic=60" $(ls -rt /srv/tftp/fai/vmlinuz*686* | tail -1 | sed 's;.*/;;') debian-squeeze-1
Nun kommen wir zum erstellen des FAI NFSroot und des FAI Mirrors fuer amd64 (wird auch zum update ausgefuehrt):
export FAI_DEBMIRROR=192.168.39.2:/srv/fai/mirror/amd64/debian-squeeze export FAI_ETC_DIR=/etc/fai-amd64 export APT_CONFIG=/etc/fai-amd64/apt_arch.conf aptitude update fai-setup -C /etc/fai-amd64 -v fai-mirror -C /etc/fai-amd64 -v /srv/fai/mirror/amd64/debian-squeeze make-fai-nfsroot -C /etc/fai-amd64 -v export -n APT_CONFIG FAI_ETC_DIR FAI_DEBMIRROR aptitude update
In /srv/fai/nfsroot-amd64/live/filesystem.dir/etc/initramfs-tools/initramfs.conf folgendes ersetzen:
KEYMAP=y BOOT=nfs
chroot /srv/fai/nfsroot-amd64/live/filesystem.dir /bin/bash --login mount -t proc none /proc/ update-initramfs -k all -u umount /proc/ exit
mkdir /srv/tftp/fai/ cd /srv/fai/nfsroot-amd64/live/filesystem.dir/boot/ cp initrd.img-2.6.32-*-amd64 /srv/tftp/fai/ cp vmlinuz-2.6.32-*-amd64 /srv/tftp/fai/
Nun konfigurieren wir PXE:
mkdir /srv/tftp/fai/pxelinux.cfg
fai-chboot -k "initrd=$(ls -rt /srv/tftp/fai/initrd.img*amd64* | tail -1 | sed 's;.*/;;') ip=dhcp root=/dev/nfs nfsroot=192.168.39.2:/srv/fai/nfsroot-amd64 boot=live FAI_FLAGS=verbose,sshd,createvt,reboot FAI_ACTION=install panic=60" $(ls -rt /srv/tftp/fai/vmlinuz*amd64* | tail -1 | sed 's;.*/;;') debian-squeeze-1
Jetzt richten wir tftpd ein, in /etc/xinetd.d/tftp fuegen wir folgendes ein:
service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = --tftpd-timeout 300 --retry-timeout 5 --maxthread 100 --verbose=5 /srv/tftp/fai/ log_type = FILE /var/log/tftpd.log }
Und nun wird DHCPd eingerichtet,als erstes sichern wir uns die default conf Datei:
mv /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.orig
Folgendes in /etc/dhcp/dhcpd.conf ersetzen/hinzufuegen:
log-facility local7; option dhcp-max-message-size 2048; use-host-decl-names on; deny unknown-clients; allow bootp; allow booting; subnet 192.168.39.0 netmask 255.255.255.0 { range 192.168.39.100 192.168.39.250; option domain-name "local"; option domain-name-servers 192.168.39.253; option routers 192.168.39.253; option broadcast-address 192.168.39.255; default-lease-time 86400; max-lease-time 604800; } group { filename "pxelinux.0"; next-server 192.168.39.2; host debian-squeeze-1 { hardware ethernet 08:00:22:22:22:21; fixed-address 192.168.39.226; } }
Danach einmal den DHCPd restarten:
/etc/init.d/isc-dhcp-server restart