LTSP/BuildYourself/p7

Материал из ALT Linux Wiki

Самостоятельная установка ALTSP на Седьмой Платформе (p7)

Настройка сервера

Проверено на starterkit сервера (http://mirror.yandex.ru/altlinux-starterkits/release/altlinux-p7-server-20150912-i586.iso[altlinux-p7-server-20150912-i586.iso]). При установке выбран режим Custom, установлено имя хоста server.ltsp, статический IP-адрес 192.168.0.1/24. На установленной системе необходимо выполнить следующую последовательность действий:

#!/bin/bash
apt-get update
apt-get dist-upgrade -y
apt-get install ltsp-server-basic -y # или 

ln -s /etc/ltsp/dhcpd.conf /etc/dhcp/dhcpd.conf

sed -i -e 's/^}/\tonly_from = 192.168.0.0\/24\n}/' /etc/xinetd.d/tftp 

chkconfig dhcpd on
chkconfig tftp on
chkconfig xinetd on
chkconfig rpcbind on # вместо portmap
chkconfig nfs on

# отредактируем ltsp-build-client.conf
sed -i -e 's/Sisyphus/\/p7\/branch/' /etc/ltsp/ltsp-build-client.conf

ltsp-build-client --debug --progress # соберем образ chroot

# настроим адресацию хостов
grep -q ^192.168.0.1 /etc/hosts || echo "192.168.0.1 server server.ltsp" >> /etc/hosts
grep -q ^192.168.0.250 /etc/hosts || {
        for i in `seq 20 250`; do
                echo "192.168.0.$i ws$i ws$i.ltsp" >> /etc/hosts
        done
}

# заменим сломанный pxelinux.0 (это баг https://bugzilla.altlinux.org/show_bug.cgi?id=31534)
cd /tmp
curl -O ftp://www.kernel.org/pub/linux/utils/boot/syslinux/4.xx/syslinux-4.04.tar.bz2
tar xf syslinux-4.04.tar.bz2
cp syslinux-4.04/core/pxelinux.0 /var/lib/tftpboot/ltsp/i586/pxelinux.0
cd /

# разрешим подключения к rpcbind из сети
control rpcbind server