ltsp

A tecnologia LTSP (Linux Terminal Server Project) é utilizada para ambientes de rede com terminais ou estações sem disco (diskless), que podem dar boot através da interface de rede diretamente. Outro alternativa é o boot com o auxílio de um disquete, cdrom ou pendrive, estas mídias devem conter uma imagem de boot para iniciar sua interface de rede e rodar um cliente DHCP com suporte ao protocolo PXE.

Basicamente um servidor LTSP precisa do DHCP Server, TFTP Server e NFS Server. É uma infraestrutura servidor/cliente, os terminais depois de iniciar pela rede via pxe vão carregar o ambiente gráfico e consumir recursos de hardware e software do servidor.

ambiente

HOST

  • Macbook Pro - mid2010 - rodando OSX Lion
  • VirtualBox 4.1.8

GUEST VM1

  • Debian Squeeze
  • Placas de Rede (3)
    • Interface NAT (DHCP) - sua saída para internet
    • Interface Host Only (DHCP) - para você se conectar a partir do console do OSX
    • Inferface Internal - rede ltsp - 192.168.0.1 (fixo) - para servir os thinclients
  • Disco de 6 Gigas
  • USB Desligado
  • Serial Deslgiado
  • Audio Desligado

GUEST VM2

  • Sem disco
  • Placas de rede (1)
    • Internal - rede ltsp - DHCP
  • USB Desligado
  • Serial Desligado
  • Audio Desligado

instalação

Aqui vou descrever a instalação completa do ambiente LTSP em Debian Squeeze

ltsp-server

a primeira coisa a ser feita é instalar o pacote ltsp-server-standalone, ele sozinho tará as dependências para rodar o ambiente.

root@debian-ltsp:~# aptitude install ltsp-server-standalone
The following NEW packages will be installed:
  debconf-utils{a} debootstrap{a} dhcp3-server{a} isc-dhcp-server ldm-server{a} libasound2-plugins{a} libsamplerate0{a} ltsp-server{a} 
  ltsp-server-standalone ltspfs{a} nbd-server{a} nfs-kernel-server{a} openbsd-inetd{a} squashfs-tools{a} tftpd-hpa{a} 
0 packages upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,865 kB of archives. After unpacking 6,025 kB will be used.
Do you want to continue? [Y/n/?] y
Get:1 http://sft.if.usp.br/debian/ squeeze/main debconf-utils all 1.5.36.1 [47.5 kB]
Get:2 http://sft.if.usp.br/debian/ squeeze/main isc-dhcp-server amd64 4.1.1-P1-15+squeeze3 [410 kB]
Get:3 http://sft.if.usp.br/debian/ squeeze/main libsamplerate0 amd64 0.1.7-3 [1,349 kB]
Get:4 http://sft.if.usp.br/debian/ squeeze/main libasound2-plugins amd64 1.0.23-1+b1 [84.7 kB]
Get:5 http://sft.if.usp.br/debian/ squeeze/main ltspfs amd64 0.7-2 [31.1 kB]
Get:6 http://sft.if.usp.br/debian/ squeeze/main nbd-server amd64 1:2.9.16-8 [60.4 kB]
Get:7 http://sft.if.usp.br/debian/ squeeze/main nfs-kernel-server amd64 1:1.2.2-4squeeze2 [170 kB]
Get:8 http://sft.if.usp.br/debian/ squeeze/main openbsd-inetd amd64 0.20080125-6 [37.8 kB]
Get:9 http://sft.if.usp.br/debian/ squeeze/main squashfs-tools amd64 1:4.0-8 [122 kB]
Get:10 http://sft.if.usp.br/debian/ squeeze/main debootstrap all 1.0.26+squeeze1 [57.5 kB]
Get:11 http://sft.if.usp.br/debian/ squeeze/main dhcp3-server all 4.1.1-P1-15+squeeze3 [25.9 kB]
Get:12 http://sft.if.usp.br/debian/ squeeze/main ldm-server all 2:2.1.2-2 [64.9 kB]
Get:13 http://sft.if.usp.br/debian/ squeeze/main ltsp-server all 5.2.4-2 [225 kB]
Get:14 http://sft.if.usp.br/debian/ squeeze/main tftpd-hpa amd64 5.0-18 [49.1 kB]
Get:15 http://sft.if.usp.br/debian/ squeeze/main ltsp-server-standalone all 5.2.4-2 [130 kB]
Fetched 2,865 kB in 2s (970 kB/s)          
Preconfiguring packages ...
Selecting previously deselected package debconf-utils.
(Reading database ... 127926 files and directories currently installed.)
Unpacking debconf-utils (from .../debconf-utils_1.5.36.1_all.deb) ...
Selecting previously deselected package isc-dhcp-server.
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15+squeeze3_amd64.deb) ...
Selecting previously deselected package libsamplerate0.
Unpacking libsamplerate0 (from .../libsamplerate0_0.1.7-3_amd64.deb) ...
Selecting previously deselected package libasound2-plugins.
Unpacking libasound2-plugins (from .../libasound2-plugins_1.0.23-1+b1_amd64.deb) ...
Selecting previously deselected package ltspfs.
Unpacking ltspfs (from .../ltspfs_0.7-2_amd64.deb) ...
Selecting previously deselected package nbd-server.
Unpacking nbd-server (from .../nbd-server_1%3a2.9.16-8_amd64.deb) ...
Selecting previously deselected package nfs-kernel-server.
Unpacking nfs-kernel-server (from .../nfs-kernel-server_1%3a1.2.2-4squeeze2_amd64.deb) ...
Selecting previously deselected package openbsd-inetd.
Unpacking openbsd-inetd (from .../openbsd-inetd_0.20080125-6_amd64.deb) ...
Selecting previously deselected package squashfs-tools.
Unpacking squashfs-tools (from .../squashfs-tools_1%3a4.0-8_amd64.deb) ...
Selecting previously deselected package debootstrap.
Unpacking debootstrap (from .../debootstrap_1.0.26+squeeze1_all.deb) ...
Selecting previously deselected package dhcp3-server.
Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15+squeeze3_all.deb) ...
Selecting previously deselected package ldm-server.
Unpacking ldm-server (from .../ldm-server_2%3a2.1.2-2_all.deb) ...
Selecting previously deselected package ltsp-server.
Unpacking ltsp-server (from .../ltsp-server_5.2.4-2_all.deb) ...
Selecting previously deselected package tftpd-hpa.
Unpacking tftpd-hpa (from .../tftpd-hpa_5.0-18_amd64.deb) ...
Selecting previously deselected package ltsp-server-standalone.
Unpacking ltsp-server-standalone (from .../ltsp-server-standalone_5.2.4-2_all.deb) ...
Processing triggers for man-db ...
Setting up debconf-utils (1.5.36.1) ...
Setting up isc-dhcp-server (4.1.1-P1-15+squeeze3) ...
Generating /etc/default/isc-dhcp-server...
Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Setting up libsamplerate0 (0.1.7-3) ...
Setting up libasound2-plugins (1.0.23-1+b1) ...
Setting up ltspfs (0.7-2) ...
Setting up nbd-server (1:2.9.16-8) ...
Adding system user `nbd' (UID 110) ...
Adding new group `nbd' (GID 117) ...
Adding new user `nbd' (UID 110) with group `nbd' ...
Not creating home directory `/etc/nbd-server'.
** Message: No configured exports; quitting.
 nbd-server.
Setting up nfs-kernel-server (1:1.2.2-4squeeze2) ...

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
Starting NFS common utilities: statd.
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsd mountd.
Setting up openbsd-inetd (0.20080125-6) ...
Stopping internet superserver: inetd.
Not starting internet superserver: no services enabled.
Setting up squashfs-tools (1:4.0-8) ...
Setting up debootstrap (1.0.26+squeeze1) ...
Setting up dhcp3-server (4.1.1-P1-15+squeeze3) ...
Setting up ldm-server (2:2.1.2-2) ...
Setting up ltsp-server (5.2.4-2) ...
NOTE: you will probably want to add to /etc/exports:
/opt/ltsp       *(ro,no_root_squash,async)
and then run:
invoke-rc.d nfs-kernel-server reload
Setting up tftpd-hpa (5.0-18) ...
Starting HPA's tftpd: in.tftpd.
Setting up ltsp-server-standalone (5.2.4-2) ...

Observe que houve um erro no DHCP, isso ocorre pois precisamos primeiro configurar o DHCPd antes de iniciá-lo.

ltsp build client

vamos agora criar o ambiente para os clientes ltsp usando o comando ltsp-build-client.

primeiro ele faz download do sistema básico

  
root@debian-ltsp:~# ltsp-build-client
NOTE: adding default dist and components to security mirror:
http://security.debian.org/ squeeze/updates main
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 9FED2BCBDCD29CDF762678CBAED4B06F473041FA)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: insserv libbz2-1.0 libdb4.8 libslang2 
I: Checking component main on http://http.us.debian.org/debian...
I: Retrieving libacl1
I: Validating libacl1
I: Retrieving adduser
I: Validating adduser
I: Retrieving apt
I: Validating apt
I: Retrieving libattr1
I: Validating libattr1
I: Retrieving base-files
I: Validating base-files
I: Retrieving base-passwd
I: Validating base-passwd

...

I: Configuring libept1...
I: Base system installed successfully.
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
Adding 'diversion of /sbin/start-stop-daemon to /sbin/start-stop-daemon.real by ltsp-client'
update-alternatives: using /usr/sbin/policy-rc.d.ltsp to provide /usr/sbin/policy-rc.d (policy-rc.d) in auto mode.
Adding 'diversion of /etc/mtab to /etc/mtab.real by ltsp-client'
`/opt/ltsp/amd64/etc/apt/sources.list' -> `/opt/ltsp/amd64/etc/apt/sources.list.old'

depois ele vai começar a baixar pacotes do x e gnome

Get:1 http://security.debian.org squeeze/updates Release.gpg [836 B]                   
Ign http://security.debian.org/ squeeze/updates/main Translation-en                    
Ign http://security.debian.org/ squeeze/updates/main Translation-en_US
Get:2 http://security.debian.org squeeze/updates Release [86.9 kB]
Hit http://http.us.debian.org squeeze Release.gpg  
Ign http://http.us.debian.org/debian/ squeeze/main Translation-en
Ign http://http.us.debian.org/debian/ squeeze/main Translation-en_US
Hit http://http.us.debian.org squeeze Release      
Get:3 http://security.debian.org squeeze/updates/main amd64 Packages [249 kB]
Hit http://http.us.debian.org squeeze/main amd64 Packages
Fetched 337 kB in 1s (214 kB/s)                         
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  alsa-base alsa-utils busybox console-setup console-terminus consolekit cpp cpp-4.4 cryptsetup cups-bsd cups-client cups-common dbus defoma dmsetup
  dmz-cursor-theme file fontconfig fontconfig-config fuse-utils gettext-base gnome-audio gstreamer0.10-pulseaudio gtk2-engines-ubuntulooks
  hicolor-icon-theme initramfs-tools inputattach iso-codes kbd keyboard-configuration klibc-utils ldm libasound2 libasound2-plugins libasyncns0 libatk1.0-0
  libatk1.0-data libaudit0 libavahi-client3 libavahi-common-data libavahi-common3 libavcodec52 libavutil49 libbsd0 libcairo2 libcap2 libck-connector0
  libcrypt-passwdmd5-perl libcups2 libcupsimage2 libdatrie1 libdb4.7 libdbus-1-3 libdbus-glib-1-2 libdevmapper1.02.1 libdigest-sha1-perl libdirac-encoder0
  libdrm-intel1 libdrm-nouveau1 libdrm-radeon1 libdrm2 libedit2 libeggdbus-1-0 libexif12 libexpat1 libfaad2 libfile-copy-recursive-perl libflac8
  libfont-freetype-perl libfontconfig1 libfontenc1 libfreetype6 libfs6 libfuse2 libgcrypt11 libgdbm3 libgl1-mesa-dri libgl1-mesa-glx libglib2.0-0
  libglib2.0-data libglu1-mesa libgmp3c2 libgnutls26 libgpg-error0 libgphoto2-2 libgphoto2-port0 libgsm1 libgssapi-krb5-2 libgstreamer-plugins-base0.10-0
  libgstreamer0.10-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libhal1 libice6 libieee1284-3 libjack-jackd2-0 libjasper1 libjpeg62 libk5crypto3
  libkeyutils1 libklibc libkrb5-3 libkrb5support0 liblockfile1 libltdl7 libmagic1 libmpfr4 libogg0 libopenjpeg2 liborc-0.4-0 libpam-ck-connector
  libpango1.0-0 libpango1.0-common libpci3 libpciaccess0 libpcre3 libpixman-1-0 libpng12-0 libpolkit-gobject-1-0 libpulse-browse0 libpulse0 libsamplerate0
  libsane libsane-extras libschroedinger-1.0-0 libsm6 libsndfile1 libspeex1 libspeexdsp1 libsqlite3-0 libtasn1-3 libthai-data libthai0 libtheora0 libtiff4
  libutempter0 libv4l-0 libvorbis0a libvorbisenc2 libwrap0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-atom1 libxcb-aux0 libxcb-dri2-0
  libxcb-render-util0 libxcb-render0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxfont1 libxft2 libxi6 libxinerama1
  libxkbfile1 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxt6 libxtst6 libxv1 libxvmc1 libxxf86dga1 libxxf86vm1 linux-sound-base
  lockfile-progs lsb-release lsof ltsp-client-core ltspfsd ltspfsd-core mdetect mime-support nbd-client ntpdate numlockx openssh-blacklist
  openssh-blacklist-extra openssh-client pciutils perl perl-modules pulseaudio pulseaudio-esound-compat pulseaudio-module-x11 pulseaudio-utils python
  python-central python-minimal python-serial python-support python2.6 python2.6-minimal rdesktop sane-utils sgml-base shared-mime-info sshfs syslinux
  syslinux-common tcpd tftp-hpa ttf-dejavu-core ucf update-inetd whiptail x-ttcidfont-conf x11-apps x11-common x11-session-utils x11-utils x11-xfs-utils
  x11-xkb-utils x11-xserver-utils xauth xbitmaps xfonts-100dpi xfonts-75dpi xfonts-base xfonts-encodings xfonts-scalable xfonts-utils xinit xkb-data
  xml-core xorg xorg-docs-core xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati xserver-xorg-video-chips
  xserver-xorg-video-cirrus xserver-xorg-video-fbdev xserver-xorg-video-i128 xserver-xorg-video-intel xserver-xorg-video-mach64 xserver-xorg-video-mga
  xserver-xorg-video-neomagic xserver-xorg-video-nouveau xserver-xorg-video-nv xserver-xorg-video-openchrome xserver-xorg-video-r128
  xserver-xorg-video-radeon xserver-xorg-video-rendition xserver-xorg-video-s3 xserver-xorg-video-s3virge xserver-xorg-video-savage
  xserver-xorg-video-siliconmotion xserver-xorg-video-sis xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident
  xserver-xorg-video-tseng xserver-xorg-video-vesa xserver-xorg-video-vmware xserver-xorg-video-voodoo xterm
Suggested packages:
  apmd alsa-oss oss-compat cpp-doc gcc-4.4-locales dosfstools cups kdeprint gtklp cups-pt xpp dbus-x11 defoma-doc psfontmgr dfontmgr gnome-core
  bash-completion isoquery rng-tools libglide3 gnutls-bin gphoto2 gtkam krb5-doc krb5-user libvisual-0.4-plugins gstreamer-codec-install gnome-codec-install
  gstreamer0.10-tools gstreamer0.10-plugins librsvg2-common gvfs jackd2 libjasper-runtime ttf-japanese-gothic ttf-japanese-mincho ttf-thryomanes ttf-baekmuk
  ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp avahi-daemon hpoj hplip speex lsb sdm-terminal x-display-manager
  ssh-askpass libpam-ssh keychain bzip2 perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl make pavumeter pavucontrol paman paprefs python-doc
  python-tk python-profiler python-wxgtk2.8 python-wxgtk2.6 python-wxgtk python2.6-doc python2.6-profiler binutils binfmt-support unpaper sgml-base-doc
  mtools mesa-utils nickle cairo-5c xfs xserver debhelper xorg-docs gpointing-device-settings touchfreeze xinput firmware-linux xfonts-cyrillic
The following NEW packages will be installed:
  alsa-base alsa-utils busybox console-setup console-terminus consolekit cpp cpp-4.4 cryptsetup cups-bsd cups-client cups-common dbus defoma dmsetup
  dmz-cursor-theme file fontconfig fontconfig-config fuse-utils gettext-base gnome-audio gstreamer0.10-pulseaudio gtk2-engines-ubuntulooks
  hicolor-icon-theme initramfs-tools inputattach iso-codes kbd keyboard-configuration klibc-utils ldm libasound2 libasound2-plugins libasyncns0 libatk1.0-0
  libatk1.0-data libaudit0 libavahi-client3 libavahi-common-data libavahi-common3 libavcodec52 libavutil49 libbsd0 libcairo2 libcap2 libck-connector0
  libcrypt-passwdmd5-perl libcups2 libcupsimage2 libdatrie1 libdb4.7 libdbus-1-3 libdbus-glib-1-2 libdevmapper1.02.1 libdigest-sha1-perl libdirac-encoder0
  libdrm-intel1 libdrm-nouveau1 libdrm-radeon1 libdrm2 libedit2 libeggdbus-1-0 libexif12 libexpat1 libfaad2 libfile-copy-recursive-perl libflac8
  libfont-freetype-perl libfontconfig1 libfontenc1 libfreetype6 libfs6 libfuse2 libgcrypt11 libgdbm3 libgl1-mesa-dri libgl1-mesa-glx libglib2.0-0
  libglib2.0-data libglu1-mesa libgmp3c2 libgnutls26 libgpg-error0 libgphoto2-2 libgphoto2-port0 libgsm1 libgssapi-krb5-2 libgstreamer-plugins-base0.10-0
  libgstreamer0.10-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libhal1 libice6 libieee1284-3 libjack-jackd2-0 libjasper1 libjpeg62 libk5crypto3
  libkeyutils1 libklibc libkrb5-3 libkrb5support0 liblockfile1 libltdl7 libmagic1 libmpfr4 libogg0 libopenjpeg2 liborc-0.4-0 libpam-ck-connector
  libpango1.0-0 libpango1.0-common libpci3 libpciaccess0 libpcre3 libpixman-1-0 libpng12-0 libpolkit-gobject-1-0 libpulse-browse0 libpulse0 libsamplerate0
  libsane libsane-extras libschroedinger-1.0-0 libsm6 libsndfile1 libspeex1 libspeexdsp1 libsqlite3-0 libtasn1-3 libthai-data libthai0 libtheora0 libtiff4
  libutempter0 libv4l-0 libvorbis0a libvorbisenc2 libwrap0 libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-atom1 libxcb-aux0 libxcb-dri2-0
  libxcb-render-util0 libxcb-render0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6 libxext6 libxfixes3 libxfont1 libxft2 libxi6 libxinerama1
  libxkbfile1 libxml2 libxmu6 libxmuu1 libxpm4 libxrandr2 libxrender1 libxt6 libxtst6 libxv1 libxvmc1 libxxf86dga1 libxxf86vm1 linux-sound-base
  lockfile-progs lsb-release lsof ltsp-client ltsp-client-core ltspfsd ltspfsd-core mdetect mime-support nbd-client ntpdate numlockx openssh-blacklist
  openssh-blacklist-extra openssh-client pciutils perl perl-modules pulseaudio pulseaudio-esound-compat pulseaudio-module-x11 pulseaudio-utils python
  python-central python-minimal python-serial python-support python2.6 python2.6-minimal rdesktop sane-utils sgml-base shared-mime-info sshfs syslinux
  syslinux-common tcpd tftp-hpa ttf-dejavu-core ucf update-inetd whiptail x-ttcidfont-conf x11-apps x11-common x11-session-utils x11-utils x11-xfs-utils
  x11-xkb-utils x11-xserver-utils xauth xbitmaps xfonts-100dpi xfonts-75dpi xfonts-base xfonts-encodings xfonts-scalable xfonts-utils xinit xkb-data
  xml-core xorg xorg-docs-core xserver-common xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-apm xserver-xorg-video-ark xserver-xorg-video-ati xserver-xorg-video-chips
  xserver-xorg-video-cirrus xserver-xorg-video-fbdev xserver-xorg-video-i128 xserver-xorg-video-intel xserver-xorg-video-mach64 xserver-xorg-video-mga
  xserver-xorg-video-neomagic xserver-xorg-video-nouveau xserver-xorg-video-nv xserver-xorg-video-openchrome xserver-xorg-video-r128
  xserver-xorg-video-radeon xserver-xorg-video-rendition xserver-xorg-video-s3 xserver-xorg-video-s3virge xserver-xorg-video-savage
  xserver-xorg-video-siliconmotion xserver-xorg-video-sis xserver-xorg-video-sisusb xserver-xorg-video-tdfx xserver-xorg-video-trident
  xserver-xorg-video-tseng xserver-xorg-video-vesa xserver-xorg-video-vmware xserver-xorg-video-voodoo xterm
0 upgraded, 277 newly installed, 0 to remove and 0 not upgraded.
Need to get 125 MB of archives.
After this operation, 340 MB of additional disk space will be used.
Get:1 http://security.debian.org/ squeeze/updates/main libxml2 amd64 2.7.8.dfsg-2+squeeze2 [873 kB]
Get:2 http://http.us.debian.org/debian/ squeeze/main console-terminus all 4.30-2 [527 kB]
Get:3 http://security.debian.org/ squeeze/updates/main libpolkit-gobject-1-0 amd64 0.96-4+squeeze1 [55.6 kB]
Get:4 http://http.us.debian.org/debian/ squeeze/main xkb-data all 1.8-2 [839 kB]  

...

Setting up firmware-linux-free (2.6.32-41) ...
Setting up linux-image-amd64 (2.6.32+29) ...

Current default time zone: 'America/Sao_Paulo'
Local time is now:      Thu Feb  2 16:26:14 BRST 2012.
Universal Time is now:  Thu Feb  2 18:26:14 UTC 2012.

Updating /var/lib/tftpboot directories for chroot: /opt/ltsp/amd64
Updating /srv/tftp directories for chroot: /opt/ltsp/amd64
WARNING: no entry for /opt/ltsp in /etc/exports,
you may want to add the following line to /etc/exports:

/opt/ltsp       *(ro,no_root_squash,async,no_subtree_check)

and then run the command:

Instalação completada, agora vamos a configuração dos demais serviços.

repo local

Se você quiser, pode fazer download dos arquivos a partir de um repositório local ftp/http/dvd ou mesmo a partir de uma imagem, veja o exemplo abaixo:

ltsp-build-client --mirror file://mnt/Debian_BlueRay_DVD_Image.img --security-mirror none --accept-unsigned-packages

openssh

certifique-se de que o ssh server está instalado

aptitude install openssh-server

e verifique se a diretiva

X11Forwarding yes

está habilitada no aquivo /etc/ssh/sshd_config

nfs e portmap

Adicione a linha abaixo ao /etc/exports

/opt/ltsp *(ro,no_root_squash,async,no_subtree_check)

verifique se o portmap está iniciando no loopback - /etc/default/portmap, se estiver comente a linha

OPTIONS="-i 127.0.0.1"

reinicie o portmap e nfs-kernel-server

invoke-rc.d nfs-kernel-server restart
invoke-rc.d portmap restart

dhcp3-server

O pacote ltsp-server-standalone já instalou o DHCP Server, agora precisamos configurá-lo, isto é bem simples, o pacote ltps-server-standalone já criou o arquivo de configuração em /etc/ltsp/dhcpd.conf, basta que façamos o include ao final do arquivo /etc/dhcp3-server/dhcpd.conf

Edite o arquivo /etc/dhcp3-server/dhcpd.conf e insira a linha abaixo ao final do arquivo.

include "/etc/ltsp/dhcpd.conf";

o conteúdo do arquivo que fizemos o include está logo abaixo, você pode ajustá-lo conforme suas necessidades

#
# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.20 192.168.0.250;
    option domain-name "example.com";
    option domain-name-servers 192.168.0.1;
    option broadcast-address 192.168.0.255;
    option routers 192.168.0.1;
    next-server 192.168.0.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
    option root-path "/opt/ltsp/i386";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
        filename "/ltsp/i386/pxelinux.0";
    } else {
        filename "/ltsp/i386/nbi.img";
    }
}

reinicie o dhcp

invoke-rc.d isc-dhcp-server restart

tftpd-hpa

adicionar a linha abaixo no arquivo /etc/default/tftpd-hpa

RUN_DAEMON="yes"

isto fará com o tftp rode independente do inetd, para garantir edite o arquivo /etc/inetd.conf e comente a linha abaixo

tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot

após estes procedimentos, reinicie o inetd e o tftpd-hpa

invoke-rc.d openbsd-inetd restart
invoke-rc.d tftpd-hpa restart

thinclient

Se o servidor foi configurado corretamente, bastará ligar o thinclient para que ele inicie o processo de boot via protocolo PXE.

O thinclient tem de estar ligado no mesmo switch do servidor LTSP para que consiga solicitar o IP.

Se o boot por PXE funcionar você vai visualizar uma tela como esta abaixo:

O Idioma depende de como você instalou seu Debian, no meu caso instalei apenas em inglês.

A sessão padrão é o GNOME, porém você pode utilizar um gerenciador de janelas como LXDE ou ambiente gráfico mais robusto como o KDE.

extras

Aqui vou em breve descrever algumas configurações LTS e pretendo mostrar como habilitar recursos multimídia nos thinclients. Isto significa que poderão utilizar caixas acústicas, fones de ouvido, microfones e dispositivos removíveis nas interfaces USB.

lts.conf

auto login

habilitando audio

habilitando ltspfs

O LTSPFS nos permite utilizar a interface USB presente nos THIN-CLIENTS, assim podemos conectar cameras, hds e outros dispositivos similares.

resolvendo problemas

travamento no thinclient

Isso pode estar relacionado a conectividade

  • Veja se o servidor está com o IP correto em suas interfaces
  • Veja se o Switch está com energia
  • Veja se o servidor está ligado e serviços disponíveis
  • Veja se os cabos do thinclient e do servidor estão devidamente conectados e funcionando

logon no thinclient

Não conseguir logar pode ocorrer por várias razões:

  • Se você fez o setup do ambiente ltsp com o IP temporário (NAT)
  • Se você trocou o ip do servidor após ter feito o setup ltsp

Use o comando abaixo se você desconfia que seja um dos problemas acima.

ltsp-update-sshkeys

Caso não seja isto, verifique nos arquivos de log do servidor LTSP, principalmente no auth.log ele pode te dar alguma ideia sobre problemas de autenticação user/senha/sessão no thinclient.

referências



ltsp_instalando_servidor_em_debian_squeeze.txt · Last modified: 2012/02/02 22:30 by gutocarvalho
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0