|
Don't read this page. The new recommended way to install ltsp-pnp is with LTSP Manager: http://wiki.ltsp.org/wiki/Ltsp-manager |
Introduction
This page describes an alternative way to install and maintain LTSP that supports both thin and fat clients. No chroots are used and a single-NIC setup with an external DHCP server (e.g. a router) is recommended (but not required) as it uses dnsmasq in proxyDHCP mode.
Prerequisites
It's assumed that you've installed Ubuntu >= 12.04 without LTSP, e.g. using the desktop CD. Ubuntu-mate is a good choice, it works well with LTSP even on older clients.
Your clients need to be the same architecture as your server, so if they're i386, you need to install the i386 Ubuntu variant in the server as well. If you have more than 4 Gb RAM don't worry, the default -pae kernel can access up to 64 Gb RAM.
It's recommended that you setup your network first. A static IP is suggested but not required for single NIC setups. If you're using a dual NIC setup, configure the internal NIC to 192.168.67.1.
Also, it's suggested that you install on your server any programs that you want to make available to fat clients.
Installation
ltsp-pnp is available since Ubuntu 12.10. In order to install it to Ubuntu 12.04, you'll need to add the Greek schools PPA to your sources, which contains very up to date LTSP and LDM versions, maintained by an LTSP developer (alkisg). It gets updated whenever grave bugs are discovered in LTSP, so it's better to add it whatever LTS Ubuntu version you are using! So, to add the PPA and to install ltsp-pnp, execute the following commands:
sudo -i add-apt-repository --yes ppa:ts.sch.gr apt-get update apt-get --yes --install-recommends install dnsmasq ltsp-server-standalone ltsp-client ldm-ubuntu-theme ltsp-config dnsmasq echo 'IPAPPEND=3' >> /etc/ltsp/update-kernels.conf /usr/share/ltsp/update-kernels
Installing epoptes
The epoptes package allows you to monitor your LTSP clients, broadcast your screen and execute commands on them. If you want to install it, run:
apt-get install epoptes
gpasswd -a ${SUDO_USER:-$USER} epoptes
Generating the client image
After the initial installation, and also any time that you have server updates (new software etc) that you want to push to your clients, you need to run the following command:
ltsp-update-image --cleanup /
If you need to, you can exclude some of your server files or directories from the generated image from /etc/ltsp/ltsp-update-image.excludes.
Editing lts.conf
To create an initial lts.conf, run:
ltsp-config lts.conf xdg-open /var/lib/tftpboot/ltsp/i386/lts.conf
Note that the generated lts.conf contains LDM_DIRECTX=True, that significantly increases thin client graphics performance at a security cost.
If you don't like the default Unity session, you can install the gnome-session-fallback package and uncomment LDM_SESSION in lts.conf to enable it.
It's recommended that you don't install too many services on your LTSP server (e.g. apache, clamav, ...), but if you do, you may prevent them from running on your clients with the RM_SYSTEM_SERVICES lts.conf directive.
DNS issues
After doing the aforementioned steps, you'll probably end up with DNS broken both on your server, due to Ubuntu bug #1501189, and on your fat clients, because they are supposed to get their DNS from DHCP, but with IPAPPEND=3 they don't.
There are two methods to work around those issues. The first and suggested method is to tell dnsmasq to function as a DNS server as well. This would be easy if not for Ubuntu bug #959037. In short, to work around it, you need to run the following commands:
sudo -i
sed 's/^dns=dnsmasq/# Commented by ltsp-pnp: dns=dnsmasq/' \
-i /etc/NetworkManager/NetworkManager.conf
sed 's/^port=0/# Commented by ltsp-pnp: port=0/' -i /etc/dnsmasq.d/ltsp-server-dnsmasq.conf
service network-manager restart
service dnsmasq restartAfter that, the LTSP clients will automatically use the DNS server on the LTSP server.
An alternative method (i.e. only do one of them, not both of them) to work around the aforementioned issues without running a DNS server is to run these commands to work around LP: #1501189:
sudo -i echo DNSMASQ_EXCEPT=lo >> /etc/default/dnsmasq service dnsmasq restart
...and to put the appropriate DNS_SERVERs in lts.conf, for example:
DNS_SERVER="8.8.8.8 208.67.222.222"
Relevant bug reports
Depending on your setup, you might bump into the following bugs:
add-apt-repository crashes in non-UTF locale with UTF in key description
nbd-client causes service ordering cycles in Ubuntu 16.04 - in that case run: sudo dpkg-divert --rename --divert /etc/nbd-client.init /etc/init.d/nbd-client
See also
UbuntuLTSP - Community Ubuntu LTSP Documentation.
ProxyDHCP - The proxyDHCP mode of dnsmasq.
lts.conf - Man page for lts.conf.
ltsp-update-image - Man page for ltsp-update-image.
epoptes - A computer lab management and monitoring tool.
Comments
This page is maintained by https://launchpad.net/~alkisg, please don't edit it but send a mail with your suggested improvements to the author instead. I know this doesn't align with the usual wiki spirit, but in my experience when many people edit the same page it ends up being unmaintained. IMHO it's best if different people maintain different pages.