| 1 |
<?xml version='1.0' encoding="UTF-8"?> |
| 2 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 3 |
|
| 4 |
<guide link="/doc/en/ltsp.xml"> |
| 5 |
<title>Gentoo - LTSP Guide</title> |
| 6 |
<author title="Author"> |
| 7 |
<mail link="lanius@gentoo.org">Heinrich Wendel</mail> |
| 8 |
</author> |
| 9 |
<author title="Author"> |
| 10 |
<mail link="josiah@ritchietribe.net">Josiah Ritchie</mail> |
| 11 |
</author> |
| 12 |
<author title="Editor"> |
| 13 |
<mail link="swift@gentoo.org">Sven Vermeulen</mail> |
| 14 |
</author> |
| 15 |
|
| 16 |
<license/> |
| 17 |
|
| 18 |
<abstract> |
| 19 |
This guide shows you how to setup a LTSP Server with Gentoo. |
| 20 |
</abstract> |
| 21 |
<version>1.1</version> |
| 22 |
<date>26 July 2003</date> |
| 23 |
<chapter> |
| 24 |
<title>Introduction</title> |
| 25 |
<section> |
| 26 |
<title>What is LTSP?</title> |
| 27 |
<body> |
| 28 |
<p> |
| 29 |
LTSP is an abbreviation for "Linux Terminal Server Project". Installed |
| 30 |
on a server it can supply many workstations (so called thin-clients) |
| 31 |
with identical environments. All applications run on the server and |
| 32 |
therefore you can use old PCs and convert them into XTerminals. This |
| 33 |
reduces costs and maintenance especially in an environment where you |
| 34 |
need to have an uniform workspace on each computer you login, e.g. in |
| 35 |
schools or firms. |
| 36 |
</p> |
| 37 |
</body> |
| 38 |
</section> |
| 39 |
</chapter> |
| 40 |
<chapter> |
| 41 |
<title>Installation</title> |
| 42 |
<section> |
| 43 |
<title>Preliminaries</title> |
| 44 |
<body> |
| 45 |
<p> |
| 46 |
All of the examples in this document presume that your server's IP is |
| 47 |
192.168.0.254, your domain is named yourdomain.com and your network is |
| 48 |
192.168.0.0/24. |
| 49 |
</p> |
| 50 |
</body> |
| 51 |
</section> |
| 52 |
<section> |
| 53 |
<title>Installation</title> |
| 54 |
<body> |
| 55 |
|
| 56 |
<p> |
| 57 |
First of all, you must have a working Gentoo system. Please read the |
| 58 |
Gentoo Installation Manual for your architecture on <uri |
| 59 |
link="http://www.gentoo.org/doc">Gentoo's Documentation Website</uri>. |
| 60 |
</p> |
| 61 |
|
| 62 |
<p> |
| 63 |
Then lets begin with the easiest step, installing the ltsp core |
| 64 |
utils: |
| 65 |
</p> |
| 66 |
|
| 67 |
<pre caption="Emerge LTSP"> |
| 68 |
# <i>emerge ltsp-core</i> |
| 69 |
</pre> |
| 70 |
|
| 71 |
<p> |
| 72 |
This will install the following packages as dependencies: |
| 73 |
</p> |
| 74 |
|
| 75 |
<ul> |
| 76 |
<li><b>XFree</b>: They are called XTerminals, guess why :)</li> |
| 77 |
<li><b>DHCP</b>: DHCP is a protocol for automating the configuration of |
| 78 |
computers that use TCP/IP, used by ltsp to distribute IPs to the |
| 79 |
workstations.</li> |
| 80 |
<li><b>NFS</b>: NFS is a protocol to allow access to harddisks through |
| 81 |
the network, used by ltsp to mount a base system for the |
| 82 |
workstations.</li> |
| 83 |
<li><b>TFTP</b>: TFTP is a simple file transfer protocol, used by ltsp |
| 84 |
to transfer the kernel to the workstations.</li> |
| 85 |
<li><b>XINETD</b>: Xinetd is a powerful replacement for inetd, with |
| 86 |
advanced features, used by ltsp to start tftp.</li> |
| 87 |
</ul> |
| 88 |
|
| 89 |
<note> |
| 90 |
If you have the kde/gnome useflag set, it will also install a complete kde/gnome system. |
| 91 |
</note> |
| 92 |
|
| 93 |
</body> |
| 94 |
</section> |
| 95 |
</chapter> |
| 96 |
<chapter> |
| 97 |
<title>Configuration</title> |
| 98 |
<body> |
| 99 |
|
| 100 |
<p> |
| 101 |
After the emerge process has finished all services must be configured: |
| 102 |
</p> |
| 103 |
|
| 104 |
</body> |
| 105 |
<section> |
| 106 |
<title>System Logger</title> |
| 107 |
<body> |
| 108 |
|
| 109 |
<p> |
| 110 |
To analyze problems easier, the system logger must be configured to |
| 111 |
accept remote connections. Please read the documentation of your |
| 112 |
system logger on how to achieve this. |
| 113 |
</p> |
| 114 |
|
| 115 |
</body> |
| 116 |
</section> |
| 117 |
<section> |
| 118 |
<title>NFS</title> |
| 119 |
<body> |
| 120 |
|
| 121 |
<p> |
| 122 |
Next step is to edit your <path>/etc/exports</path> file, in order to |
| 123 |
allow the workstations to mount the root filesystem. There should be at |
| 124 |
least two lines in it: |
| 125 |
</p> |
| 126 |
|
| 127 |
<pre caption="/etc/exports"> |
| 128 |
/opt/ltsp/i386 192.168.0.0/255.255.255.0(ro,no_root_squash,async) |
| 129 |
/var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0(rw,no_root_squash,async) |
| 130 |
</pre> |
| 131 |
|
| 132 |
<note> |
| 133 |
You have to alter the network/netmask to match your network/netmask |
| 134 |
settings. |
| 135 |
</note> |
| 136 |
|
| 137 |
<p> |
| 138 |
Now start NFS. |
| 139 |
</p> |
| 140 |
|
| 141 |
<pre caption="Starting nfs"> |
| 142 |
# <i>rc-update add nfs default</i> |
| 143 |
# <i>/etc/init.d/nfs start</i> |
| 144 |
</pre> |
| 145 |
|
| 146 |
</body> |
| 147 |
</section> |
| 148 |
|
| 149 |
<section> |
| 150 |
<title>xinetd/tftp</title> |
| 151 |
<body> |
| 152 |
|
| 153 |
<p> |
| 154 |
By default TFTP won't be started, to change this edit |
| 155 |
<path>/etc/xinetd.d/tftp</path> and replace <c>disable=yes</c> with |
| 156 |
<c>disable=no</c>. Afterwards, start xinitd. |
| 157 |
</p> |
| 158 |
|
| 159 |
<pre caption="Starting xinetd"> |
| 160 |
# <i>rc-update add xinetd default</i> |
| 161 |
# <i>/etc/init.d/xinetd start</i> |
| 162 |
</pre> |
| 163 |
|
| 164 |
</body> |
| 165 |
</section> |
| 166 |
<section> |
| 167 |
<title>Name resolving</title> |
| 168 |
<body> |
| 169 |
|
| 170 |
<p> |
| 171 |
In order for the workstation to reach all resources, a correct name |
| 172 |
resolving must be available. There are several ways to achieve this. One |
| 173 |
is to configure a DNS server for the local network, the other (and more |
| 174 |
simple) is to have almost identical <path>/etc/hosts</path> files on all |
| 175 |
systems. We are going to use the latter. |
| 176 |
</p> |
| 177 |
|
| 178 |
<p> |
| 179 |
All workstations must be listed in <path>/etc/hosts</path>. Take a look |
| 180 |
at the example: |
| 181 |
</p> |
| 182 |
|
| 183 |
<pre caption="/etc/hosts"> |
| 184 |
127.0.0.1 localhost |
| 185 |
192.168.0.254 server server.yourdomain.com |
| 186 |
192.168.0.1 ws-1 ws-1.yourdomain.com |
| 187 |
</pre> |
| 188 |
|
| 189 |
</body> |
| 190 |
</section> |
| 191 |
<section> |
| 192 |
<title>DHCP Config</title> |
| 193 |
<body> |
| 194 |
|
| 195 |
<p> |
| 196 |
This is the most complicated step in my opinion, you have to create a |
| 197 |
valid DHCP Config (<path>/etc/dhcp/dhcpd.conf</path>). Here is an |
| 198 |
example: |
| 199 |
</p> |
| 200 |
|
| 201 |
<pre caption = "dhcpd.conf"> |
| 202 |
<codenote>Some general options</codenote> |
| 203 |
default-lease-time 21600; |
| 204 |
max-lease-time 21600; |
| 205 |
use-host-decl-names on; |
| 206 |
ddns-update-style ad-hoc; |
| 207 |
|
| 208 |
<codenote>Bootp options</codenote> |
| 209 |
allow booting; |
| 210 |
allow bootp; |
| 211 |
|
| 212 |
<codenote>Network Options</codenote> |
| 213 |
option subnet-mask 255.255.255.0; |
| 214 |
option broadcast-address 192.168.0.255; |
| 215 |
option routers 192.168.0.254; |
| 216 |
option domain-name-servers 192.168.0.254; |
| 217 |
option log-servers 192.168.0.254; |
| 218 |
option domain-name "yourdomain.com"; |
| 219 |
|
| 220 |
<codenote>LTSP Path Options</codenote> |
| 221 |
option root-path "192.168.0.254:/opt/ltsp/i386"; |
| 222 |
filename "/lts/vmlinuz-2.4.19-ltsp-1"; |
| 223 |
|
| 224 |
<codenote>If your workstations have ISA NICs uncomment the following</codenote> |
| 225 |
<codenote>lines and alter the driver and IO</codenote> |
| 226 |
#option option-128 code 128 = string; |
| 227 |
#option option-129 code 129 = text; |
| 228 |
#option option-128 e4:45:74:68:00:00; |
| 229 |
#option option-129 "NIC=ne IO=0x300"; |
| 230 |
|
| 231 |
shared-network WORKSTATIONS { |
| 232 |
subnet 192.168.0.0 netmask 255.255.255.0 { |
| 233 |
<codenote>Distribute dynamic IPs to the workstations</codenote> |
| 234 |
range dynamic-bootp 192.168.1.1 192.168.1.16; |
| 235 |
<codenote>Workstation specific configuration for PXE booting</codenote> |
| 236 |
#host ws001 { |
| 237 |
# hardware ethernet 00:E0:06:E8:00:84; |
| 238 |
# fixed-address 192.168.0.1; |
| 239 |
#} |
| 240 |
} |
| 241 |
} |
| 242 |
</pre> |
| 243 |
|
| 244 |
<p> |
| 245 |
If your workstations support PXE, you should list each one of them as we |
| 246 |
have done with <e>host ws001</e> (don't forget to uncomment it). Don't |
| 247 |
give them an adress in the dynamic range, otherwise it would be possible |
| 248 |
that more workstations have the same IP (which is troublesome). |
| 249 |
</p> |
| 250 |
|
| 251 |
<p> |
| 252 |
For more documentation on this item read the official dhcp handbook: |
| 253 |
<uri>http://www.dhcp-handbook.com/</uri> |
| 254 |
</p> |
| 255 |
|
| 256 |
<p> |
| 257 |
Now start DHCP as you did with NFS and xinetd: |
| 258 |
</p> |
| 259 |
|
| 260 |
<pre caption="start xinetd"> |
| 261 |
# <i>rc-update add dhcp default</i> |
| 262 |
# <i>/etc/init.d/dhcp start</i> |
| 263 |
</pre> |
| 264 |
|
| 265 |
<note> |
| 266 |
Note: DHCPD needs CONFIG_PACKET and CONFIG_FILTER activated in the kernel to work. |
| 267 |
</note> |
| 268 |
|
| 269 |
</body> |
| 270 |
</section> |
| 271 |
|
| 272 |
<section> |
| 273 |
<title>LTSP Configuration</title> |
| 274 |
<body> |
| 275 |
|
| 276 |
<p> |
| 277 |
There are many options to configure your workstations, visit |
| 278 |
<uri>http://www.ltsp.org/documentation/ltsp-3.0-4-en.html#AEN903</uri> |
| 279 |
for a full description of <path>/opt/ltsp/i386/etc/lts.conf</path>. |
| 280 |
</p> |
| 281 |
|
| 282 |
</body> |
| 283 |
</section> |
| 284 |
|
| 285 |
<section> |
| 286 |
<title>Displaymanager</title> |
| 287 |
<body> |
| 288 |
|
| 289 |
<p> |
| 290 |
Now you have to change your displaymanager's configuration to |
| 291 |
also accept remote connections. |
| 292 |
</p> |
| 293 |
|
| 294 |
<p> |
| 295 |
<b>XDM</b>: In <path>/etc/X11/xdm/xdm-config</path> comment out <c>DisplayManager.requestPort: 0</c> |
| 296 |
</p> |
| 297 |
|
| 298 |
<p> |
| 299 |
<b>KDM</b>: In <path>/usr/kde/3.1/share/config/kdm/kdmrc</path> look |
| 300 |
for the <c>[Xdmcp]</c> section and change <c>Enable = false</c> to |
| 301 |
<c>Enable = true</c>. |
| 302 |
</p> |
| 303 |
|
| 304 |
<p> |
| 305 |
<b>GDM</b>: In <path>/etc/X11/gdm/gdm.conf</path> look for the |
| 306 |
<c>[xdmcp]</c> section and change <c>Enable = false</c> to |
| 307 |
<c>Enable = True</c>. |
| 308 |
</p> |
| 309 |
|
| 310 |
<p> |
| 311 |
Then start the displaymanager: |
| 312 |
</p> |
| 313 |
|
| 314 |
<pre caption="Starting xdm"> |
| 315 |
# <i>rc-update add xdm default</i> |
| 316 |
# <i>/etc/init.d/xdm start</i> |
| 317 |
</pre> |
| 318 |
|
| 319 |
<warn> |
| 320 |
There seem to be problems currently with XDM and GDM. The author used |
| 321 |
KDM to resolve these issues. |
| 322 |
</warn> |
| 323 |
|
| 324 |
</body> |
| 325 |
</section> |
| 326 |
|
| 327 |
<section> |
| 328 |
<title>Creating a bootfloppy</title> |
| 329 |
<body> |
| 330 |
|
| 331 |
<p> |
| 332 |
If you workstations don't support PXE booting, you must create a |
| 333 |
boot-floppy, which is needed to start your workstations. Go to |
| 334 |
<uri>http://www.rom-o-matic.net/5.0.9/</uri>, select your NIC, press |
| 335 |
<e>Get ROM</e> and write the image to a floppy: |
| 336 |
</p> |
| 337 |
|
| 338 |
<pre caption="Write floppy iamge"> |
| 339 |
# <i>cat nicfile.lzdsk > /dev/fd0</i> |
| 340 |
</pre> |
| 341 |
|
| 342 |
</body> |
| 343 |
</section> |
| 344 |
</chapter> |
| 345 |
|
| 346 |
<chapter> |
| 347 |
<title>Troubleshooting</title> |
| 348 |
<body> |
| 349 |
|
| 350 |
<p> |
| 351 |
There are a lot of things that can be the source of trouble, but there |
| 352 |
are also several resources around which help you solve your problems: |
| 353 |
</p> |
| 354 |
|
| 355 |
<ul> |
| 356 |
<li>The official documentation: |
| 357 |
<uri>http://www.ltsp.org/documentation/</uri>, especially the |
| 358 |
Troubleshooting section.</li> |
| 359 |
<li>The gentoo IRC channel: irc.freenode.org #gentoo</li> |
| 360 |
<li>The ltsp irc channel: irc.freenode.org #ltsp</li> |
| 361 |
<li>The ltsp mailinglists <uri>http://ltsp.org/mailinglists.php</uri> |
| 362 |
are full of some real good knowledge.</li> |
| 363 |
</ul> |
| 364 |
</body> |
| 365 |
</chapter> |
| 366 |
|
| 367 |
<chapter> |
| 368 |
<title>FAQ</title> |
| 369 |
<body> |
| 370 |
<p> |
| 371 |
<b>Q:</b> My workstations have Pentium II CPUs, but my server is compiled |
| 372 |
with <c>march=athlon-xp</c>, does this work? |
| 373 |
</p> |
| 374 |
|
| 375 |
<p> |
| 376 |
<b>A:</b> This is no problem, because all applications run on the server. |
| 377 |
</p> |
| 378 |
|
| 379 |
<p> |
| 380 |
<b>Q:</b> Which CPU and how much RAM should the server have? |
| 381 |
</p> |
| 382 |
|
| 383 |
<p> |
| 384 |
<b>A:</b> There is a good document with suggestions at |
| 385 |
<uri>http://ltsp.org/documentation/server_suggestions.html</uri>. |
| 386 |
</p> |
| 387 |
|
| 388 |
<p> |
| 389 |
<b>Q:</b> Do you have more information about this PXE stuff? |
| 390 |
</p> |
| 391 |
|
| 392 |
<p> |
| 393 |
<b>A:</b> Yes, take a look at |
| 394 |
<uri>http://ltsp.org/documentation/eproms.txt</uri> |
| 395 |
and <uri>http://ltsp.org/documentation/pxe.howto.html</uri>. |
| 396 |
</p> |
| 397 |
|
| 398 |
<p> |
| 399 |
<b>Q:</b> Is it possibly to use 3D-Accelerated software on the workstations? |
| 400 |
</p> |
| 401 |
|
| 402 |
<p> |
| 403 |
<b>A:</b> If you are using NVidia cards take a look at |
| 404 |
<uri>http://ltsp.org/documentation/nvidia.txt</uri>. |
| 405 |
</p> |
| 406 |
|
| 407 |
<p> |
| 408 |
<b>Q:</b> In some applications the fonts look crapy, what do to? |
| 409 |
</p> |
| 410 |
|
| 411 |
<p> |
| 412 |
<b>A:</b> You have to setup the XFontServer, Add <c>USE_XFS=Y</c> to your |
| 413 |
<path>lts.conf</path>, edit <path>/etc/X11/fs/config</path> and comment |
| 414 |
<c>no-listen: tcp</c> out, replace <c>XFS_PORT="-1"</c> with |
| 415 |
<c>XFS_PORT="7100"</c> in <path>/etc/conf.d/xfs</path> and start xfs: |
| 416 |
<c>/etc/init.d/xfs start</c>. |
| 417 |
</p> |
| 418 |
|
| 419 |
</body> |
| 420 |
</chapter> |
| 421 |
|
| 422 |
<chapter> |
| 423 |
<title>Glossary</title> |
| 424 |
<body> |
| 425 |
|
| 426 |
<p> |
| 427 |
<b><a href="http://www.ltsp.org">LTSP</a></b> |
| 428 |
"The LTSP provides a simple way to utilize low cost workstations as either i |
| 429 |
graphical or character based terminals on a GNU/Linux server." |
| 430 |
</p> |
| 431 |
|
| 432 |
<p> |
| 433 |
<b><a href="http://www.webopedia.com/TERM/P/PXE.html">PXE</a></b> |
| 434 |
"Short for Pre-Boot Execution Environment. Pronounced pixie, PXE is one of the |
| 435 |
components of Intel's WfM specification. It allows a workstation to boot from |
| 436 |
a server on a network prior to booting the operating system on the local hard |
| 437 |
drive. A PXE-enabled workstation connects its NIC to the LAN via a jumper, |
| 438 |
which keeps the workstation connected to the network even when the power is |
| 439 |
off." |
| 440 |
</p> |
| 441 |
|
| 442 |
</body> |
| 443 |
</chapter> |
| 444 |
</guide> |