Creating an LTSP server with local device support on CentOS

    By Nathan Linley

Here is an example of an LTSP server setup using PXE capable old workstations. The server is a standard install of CentOS with most of the desktop related packages and important server packages installed.

To begin, go to http://www.ltsp.org and download the latest 4.2 version of LTSP. Install the rpm with rpm -i . Once that is installed, you can run the command ltspadmin and being the LTSP install. Select all of the components of ltsp and begin the download. For install location, I used /opt/ltsp-4.2 to allow for multiple versions if needed for future upgrades or testing.

Once you are done with the basic LTSP install, run ltspcfg or just go through the menu to it in the ltspadmin installer. Enable all of the services that are required in the configuration. The automated configurations do not put all of the information into various files that are needed. So each will be covered further down in this guide.

In order to allow for local device support (CD rom drives, USB, etc) you need to add a few more files and programs. First you will need to get a copy of FUSE for user mounting of filesystems. I didn't find a rpm for this, but you can download and compile the code with (./configure; make; make install). Once you have installed it, there will be some library files installed to /usr/local/lib. You might need to add that directory as a location in /etc/ld.so.conf and run ldconfig afterwards. After fuse is installed, you need to grant users the ability to use it by adding them to the fuse group.

The next component that you need to get is the Perl X11-Protocol package, which can be downloaded from cpan.org. Untar the file, run perl Makefile.PL; make; make install.

Lastly, you will need to get the local device support tools from ltsp here. Install the RPM file.

Now you have everything installed and are ready to begin configuration of the server.


/etc/dhcpd.conf

Here is a sample of the dhcpd.conf file that I am using, based on a 10.0.0.0/16 subnet. The terminal server in this case is 10.2.0.246, and several terminal clients have reserved ip addresses as seen below.

ddns-update-style interim;
deny client-updates;

allow booting;
allow bootp;

option subnet-mask 255.255.0.0;
option broadcast-address 10.0.255.255;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.1, 10.0.0.202;
option domain-name "domain.com";
option option-128 code 128 = string;
option option-129 code 129 = text;

get-lease-hostnames true;
next-server 10.0.0.246;
option root-path = "10.0.0.246:/opt/ltsp-4.2/i386";
use-host-decl-names on;

subnet 10.0.0.0 netmask 255.255.0.0 {
    range 10.0.0.20 10.0.0.179;

    if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
        filename "/lts/2.6.17.8-ltsp-1/pxelinux.0";
    }
    else {
        filename = "/lts/vmlinuz-2.6.17.8-ltsp-1";
    host test {
        hardware ethernet 01:d0:b3:21:58:e1;
        fixed-address 10.0.0.251;
    }

    host tsclient1 {
        hardware ethernet 01:d2:b7:27:59:e1;
        fixed-address 10.0.0.247;
    }

}

NFS /etc/exports file


/opt/ltsp-4.2 10.0.0.0/255.255.0.0(ro,no_root_squash,sync)
/var/opt/ltsp/swapfiles 10.0.0.0/255.255.0.0(rw,no_root_squash,async)

/etc/hosts

Add one entry for each of your thin clients


/etc/xinetd.d/tftp

Here is the configuration for tftp. Make sure you have the xinetd service running and set to run at startup.

service tftp
{
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /tftpboot
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
}


/opt/ltsp-4.2/i386/etc/lts.conf

[Default]
    SERVER = 10.0.0.246
    XSERVER = auto
    X_MOUSE_PROTOCOL = "ImPS/2"
    X_MOUSE_DEVICE = "/dev/psaux"
    X_MOUSE_RESOLUTION = 400
    X_MOUSE_BUTTONS = 3
    X_MODE_0 = 1024x768
    USE_XFS = N
    SCREEN_01 = startx
    SCREEN_02 = shell
    SOUND = Y
    SOUND_DAEMON = esd
    SMODULE_01 = "cs46xx"
    MODULE_01 = "ide_disk"
    MODULE_02 = "fuse"
    MODULE_03 = "usbcore"
    MODULE_04 = "usb-storage"
    LOCAL_STORAGE = Y
    HOTPLUG = Y
    ALLOW_SHUTDOWN = Y
    ALLOW_PROCREAD = Y

[test]
    LOCAL_DEVICE_01 = /dev/hdc:cdrom
    HOTPLUG = Y
    LOCAL_STORAGE=Y

Note: In the above example, I changed the mouse to ImPS/2 for scrolling support. The sound module is for the particular thinclient that I am using. You will have to find compatible modules for your client computers. I have IDE cdrom drives connected as the master on the secondary IDE controller so they appear as /dev/hdc. I tested both IDE cdrom and USB disk access and both automount in the thinclient's home directory under drives. For sound I was able to use ESD to play sound on the thin client, but you will have to make changes either to programs or the GUI environement in your graphic interface to make it work. I set it up with xmms changing the sound module to the ESD module and configuring the client ip and port 16001 as the location to play back to.
Hosted by www.Geocities.ws

1