特殊:Badtitle/NS100:ThinClientHowto
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/ThinClientHowto }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/af | • {{#if: UbuntuHelp:ThinClientHowto|Afrikaans| [[::ThinClientHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ar | • {{#if: UbuntuHelp:ThinClientHowto|العربية| [[::ThinClientHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/az | • {{#if: UbuntuHelp:ThinClientHowto|azərbaycanca| [[::ThinClientHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/bcc | • {{#if: UbuntuHelp:ThinClientHowto|جهلسری بلوچی| [[::ThinClientHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/bg | • {{#if: UbuntuHelp:ThinClientHowto|български| [[::ThinClientHowto/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/br | • {{#if: UbuntuHelp:ThinClientHowto|brezhoneg| [[::ThinClientHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ca | • {{#if: UbuntuHelp:ThinClientHowto|català| [[::ThinClientHowto/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/cs | • {{#if: UbuntuHelp:ThinClientHowto|čeština| [[::ThinClientHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/de | • {{#if: UbuntuHelp:ThinClientHowto|Deutsch| [[::ThinClientHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/el | • {{#if: UbuntuHelp:ThinClientHowto|Ελληνικά| [[::ThinClientHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/es | • {{#if: UbuntuHelp:ThinClientHowto|español| [[::ThinClientHowto/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/fa | • {{#if: UbuntuHelp:ThinClientHowto|فارسی| [[::ThinClientHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/fi | • {{#if: UbuntuHelp:ThinClientHowto|suomi| [[::ThinClientHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/fr | • {{#if: UbuntuHelp:ThinClientHowto|français| [[::ThinClientHowto/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/gu | • {{#if: UbuntuHelp:ThinClientHowto|ગુજરાતી| [[::ThinClientHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/he | • {{#if: UbuntuHelp:ThinClientHowto|עברית| [[::ThinClientHowto/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/hu | • {{#if: UbuntuHelp:ThinClientHowto|magyar| [[::ThinClientHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/id | • {{#if: UbuntuHelp:ThinClientHowto|Bahasa Indonesia| [[::ThinClientHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/it | • {{#if: UbuntuHelp:ThinClientHowto|italiano| [[::ThinClientHowto/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ja | • {{#if: UbuntuHelp:ThinClientHowto|日本語| [[::ThinClientHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ko | • {{#if: UbuntuHelp:ThinClientHowto|한국어| [[::ThinClientHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ksh | • {{#if: UbuntuHelp:ThinClientHowto|Ripoarisch| [[::ThinClientHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/mr | • {{#if: UbuntuHelp:ThinClientHowto|मराठी| [[::ThinClientHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ms | • {{#if: UbuntuHelp:ThinClientHowto|Bahasa Melayu| [[::ThinClientHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/nl | • {{#if: UbuntuHelp:ThinClientHowto|Nederlands| [[::ThinClientHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/no | • {{#if: UbuntuHelp:ThinClientHowto|norsk| [[::ThinClientHowto/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/oc | • {{#if: UbuntuHelp:ThinClientHowto|occitan| [[::ThinClientHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/pl | • {{#if: UbuntuHelp:ThinClientHowto|polski| [[::ThinClientHowto/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/pt | • {{#if: UbuntuHelp:ThinClientHowto|português| [[::ThinClientHowto/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ro | • {{#if: UbuntuHelp:ThinClientHowto|română| [[::ThinClientHowto/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/ru | • {{#if: UbuntuHelp:ThinClientHowto|русский| [[::ThinClientHowto/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/si | • {{#if: UbuntuHelp:ThinClientHowto|සිංහල| [[::ThinClientHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/sq | • {{#if: UbuntuHelp:ThinClientHowto|shqip| [[::ThinClientHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/sr | • {{#if: UbuntuHelp:ThinClientHowto|српски / srpski| [[::ThinClientHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/sv | • {{#if: UbuntuHelp:ThinClientHowto|svenska| [[::ThinClientHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/th | • {{#if: UbuntuHelp:ThinClientHowto|ไทย| [[::ThinClientHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/tr | • {{#if: UbuntuHelp:ThinClientHowto|Türkçe| [[::ThinClientHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/vi | • {{#if: UbuntuHelp:ThinClientHowto|Tiếng Việt| [[::ThinClientHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/yue | • {{#if: UbuntuHelp:ThinClientHowto|粵語| [[::ThinClientHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/zh | • {{#if: UbuntuHelp:ThinClientHowto|中文| [[::ThinClientHowto/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/zh-hans | • {{#if: UbuntuHelp:ThinClientHowto|中文(简体)| [[::ThinClientHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:ThinClientHowto | UbuntuHelp:ThinClientHowto | {{#if: | :}}ThinClientHowto}}/zh-hant | • {{#if: UbuntuHelp:ThinClientHowto|中文(繁體)| [[::ThinClientHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:ThinClientHowto|:ThinClientHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :ThinClientHowto/zh | | {{#ifexist: ThinClientHowto/zh | | {{#ifeq: {{#titleparts:ThinClientHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:ThinClientHowto|1|-1|}} | zh | | }}
What is a Thin Client?
To the user, a thin client behaves like a regular desktop computer. To the administrator, a thin client has no storage of its own, is easy to maintain, and can give the user a modern computing experience even with ancient hardware.
How do thin clients work?
Thin clients are computers that load and run most of their programs from a central server, but are displayed on the thin client's screen. In more technical terms, the thin client can either obtain a kernel from local storage, or load the kernel across the network. (Using these instructions, you will collect the linux kernel from the server using a bootable network card. This way, the thin client needs no more storage than the boot rom built into a bootable network card.)
Boot sequence
The PXE network card makes a DHCP request on the local network. The DHCP reply gives information to the card where to collect the linux kernel from. The kernel is collected over the network through the TFTP protocol. Once the kernel has been collected via TFTP, the kernel is executed; the machine boots linux. A initramfs collected with the linux kernel is mounted as a root file system. This carries and autodetect the necessary drivers for the network card, mouse, keyboard sound etc. Once the network card driver is loaded, a second DHCP request tells the client its ip address, netmask, gateway, DNS server, and root NFS (Network File System) mount point. The linux kernel runs the ubuntu initramfs, which mounts the root NFS share from the server onto the thin client read-only. The thin client now has a booted linux kernel and a root file system, much like any Linux system. From now on, when we talk of the root file system on the client, we are actually talking about a root file system mounted read-only from the server. The root file system mounted by the thin client is not the same root file system the server itself uses, but is specially prepared for thin clients, and is shared by all thin clients connected to the server (located in /opt/ltsp/<arch> on the server) . The initramfs calls the init program, the Xserver settings are autodetected and the ubuntu breezy ltsp login manager, ldm, is started.
X nuts and bolts
After logging in, ldm starts a ssh tunnel and executes a X session on the server which is displayed through the tunnel on the thin client's X server. Using ssh here has the big advantage that you don't need to have a Xserver configured on the client and no unsafe TCP X transport is used as was done in older days of ltsp.
Requirements
You will need:
- An Ubuntu 5.10 system to be the server
- At least one PXE-bootable system to be a client
- Plenty of disk space
- A fast network connection, or a local Breezy mirror, or some patience
- A DHCP server which is capable of supporting PXE clients, or a separate network segment where you can run a dedicated DHCP server
- Command-line familiarity
- A sense of adventure
- A burning desire to send feedback to ubuntu-devel
Warnings
- Please don't use this Howto if you installed Edubuntu from CD, since the Installer does nearly all of the work described here already, if you use Edubuntu, follow the Edubuntu Install Notes at http://www.edubuntu.org/GettingStarted.
- This is not the latest stable release of LTSP (4.1) but the new upcoming standard for LTSP (upstream codename MueCow). Since it is a very young implementation not all LTSP 4.1 options are supported (see EdubuntuLtsConfParams for details). Nonetheless, you can use most solutions (local device support, sound, etc.) provided at http://wiki.ltsp.org. For some of the features that are planned/being worked on for default integration see:
2. ThinClientFasterStartup 3. ThinClientLocalDevices 4. ThinClientLocalDevicesForwardConnection 5. ThinClientMemoryUsage
- Do not use the tools ltspadm and ltspcfg with this implementation of LTSP, it will for sure ruin the ltsp setup !!!
Getting Started
NOTE: If you plan to use the server as gateway/nat/firewall machine, it is strongly suggested to configure all the network interfaces before proceeding with the following steps.
- Set up the DHCP server
- If you have an existing DHCP server which can support PXE clients:
- Configure it to pass a boot filename of `/ltsp/pxelinux.0` and a root path of `/opt/ltsp/i386`
- If you are using Edgy Eft, so a boot filename is `/ltsp/i386/pxelinux.0`. The root path is the same as above.
- For ISC DHCPD, use the following options:
- If you have an existing DHCP server which can support PXE clients:
filename "/ltsp/pxelinux.0"; option root-path "/opt/ltsp/i386";
- Install `ltsp-server` on the server:
sudo apt-get install ltsp-server
- Install `ltsp-server` on the server:
- If you want to run a dedicated DHCP server on the thin client server:
- Install `ltsp-server-standalone` on the server:
sudo apt-get install ltsp-server-standalone
- Install `ltsp-server-standalone` on the server:
- If you want to run a dedicated DHCP server on the thin client server:
- If necessary, customize `/etc/ltsp/dhcpd.conf` (by default it's configured for a server at 192.168.0.1 serving PXE clients)
- If you are running a firewall on the server, you'll need to open TFTP and NFS (and DHCP if you're running the standalone server). Also, make sure portmap isn't limited to the loopback interface in /etc/default/portmap (comment out the line with "-i 127.0.0.1") if it exists, could be a leftover from Hoary. You also may want to edit `/etc/hosts.allow' and limit access for portmap, rpc.mountd, rpc.statd, and in.tftpd to the local network:
portmap: 192.168.0.0/24
rpc.mountd: 192.168.0.0/24 rpc.statd: 192.168.0.0/24 in.tftpd: 192.168.0.0/24
- Restart the nfs subsystem:
sudo invoke-rc.d nfs-kernel-server restart
- Restart the nfs subsystem:
sudo invoke-rc.d nfs-common restart
sudo invoke-rc.d portmap restart
- Build the thin client runtime environment:
sudo ltsp-build-client
- This script is hardcoded to use a particular Ubuntu mirror, so you may wish to edit it if you have a nearby mirror or CD (sudo ltsp-build-client --mirror file:///cdrom), remember to copy sources.list from the server into the chroot)
- If you changed your aptitude dependency-settings not to select recommended packages automatically, not all required packages will be downloaded and installed by this script. Then no login with sdm is possible for example because some parts of the x-server are missing
sudo apt-get install openssh-server
sudo ltsp-update-sshkeys Check `/opt/ltsp/i386/etc/ssh/ssh_known_hosts` and ensure that your host key is associated with your host's IP address. Depending on your `/etc/hosts` configuration, this may not always be correct automatically (yet). If it looks like this:
servername ssh-rsa AAAAB3NzaC1yc2EAAAABI...
then add the IP address like this:
servername,192.168.0.1 ssh-rsa AAAAB3NzaC1yc2EAAAABI...
AND file a bug in Malone. THIS SHOULD NOT HAPPEN.
sudo invoke-rc.d dhcp3-server start
- Optionally, create `/opt/ltsp/i386/etc/lts.conf`. If you don't create one, reasonable defaults and auto-detected values will be used. Note: Not all options are supported (see EdubuntuLtsConfParams).
- PXE boot the client and see what happens. If all goes well, you should see a graphical login dialog.
- If your client doesn't have PXE on the network card, you can generate a custom boot CD or floppy at ROM-o-matic.net. Burn the ISO or floppy image and boot from that.
- Log in, with any user authorized to login remotely via ssh, and see what happens. If all goes well, you should get a working desktop session on the server.
- Send mail to ubuntu-devel with your findings
Tips
If you have a separate DHCP that you do not want to install LTSP on you can just redirect the thin-client to boot off a different server. In your DHCP server's dhcpd.conf:
next-server 192.168.0.3;
where 192.168.0.3 is the address of your LTSP server
If your thin client does not start to the X and you will see the message `NFS Server not responding still trying`, so please add text
NFSOPTS="-o nolock,ro,wsize=2048,rsize=2048"
to the default tftp config in `/var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default`.
Bugs
- Bug 25528: [FIX RELEASED] Open``SSH doesn't appear to release ports used for X forwarding in a timely manner, preventing you from logging out and logging back in immediately when IPv6 support is enabled. Disable it by adding "Address``Family inet" to /etc/ssh/sshd_config, and restarting the openssh daemon.