This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:components:tce [2011/06/17 23:17] sunweaver |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Installation of the X2go TCE based on Debian ====== | ||
- | |||
- | In the following article we will explain how to set up an X2go Thin Client environment. In the following we will use three technical terms that we want to define/ | ||
- | |||
- | * X2go Server: a GNU/Linux application server that users can connect to with the '' | ||
- | * X2go Thin Client: a user workstation in your office that boots from the network with minimal software. Only purpose is to start the '' | ||
- | * X2go PXE Server: the server that serves chroot images to X2go Thin Clients via PXE, TFTP and NFS to thin client boxes. The X2go PXE Server has to be situated in your LAN. X2go PXE Server and X2go Server can be one machine, in production setups we recommend to separate these two functionalities onto two separate (virtual) servers. | ||
- | |||
- | < | ||
- | |||
- | ===== Network setup ===== | ||
- | |||
- | X2go TCE requires a local area network (LAN) that is at least switched at 100MB/s. The X2go Thin Client chroot distribution is not designed to work over the internet or on low bandwidth connections, | ||
- | |||
- | You can combine X2go Server and X2go PXE Server functionality on one system. However, for production setups we highly recommend that you dedicate a separate server as the PXE boot server for the X2go TCE. If you have the chance of splitting these two functionalities up into two, this is a recommended way of setting up your X2go Thin Client Environment. | ||
- | |||
- | <note important> | ||
- | </ | ||
- | |||
- | A normal/ | ||
- | |||
- | * X2go server (Debian, Ubuntu, etc.) | ||
- | * optional: a separate X2go PXE server (Debian or Ubuntu) | ||
- | * X2go Thin Client hardware (can be everything from e.g. Pentium III, AMD Athlon upwards), main requirement is that the thin client hardware box contains a network card that is PXE/ | ||
- | |||
- | ===== X2go TCE / Debian squeeze ===== | ||
- | |||
- | < | ||
- | |||
- | In the following description we will describe a simple X2go TCE installation, | ||
- | |||
- | The resulting X2go Thin Client chroot will be a Debian GNU/Linux (squeeze) system by default. | ||
- | |||
- | :!: **Before you continue!** | ||
- | > Please make sure that you have added the X2go repository to your package management system (on X2go server and on X2go PXE server). The required steps are described here: [[adding the X2go repository (Debian)]] | ||
- | |||
- | ==== Installing X2go server ==== | ||
- | |||
- | The X2go Server installation is described in detail on [[installing_x2goserver_debian_ubuntu|this wiki page]]. Please follow instructions there first, then proceed below. | ||
- | |||
- | Basically you have to install the '' | ||
- | |||
- | < | ||
- | $ apt-get install x2goserver gnome-desktop-environment plasma-desktop | ||
- | </ | ||
- | |||
- | ==== X2go PXE server ==== | ||
- | |||
- | === Summary === | ||
- | |||
- | In a nutshell you have to run the following commands from a terminal on the X2go PXE Server (or X2go Server if combining both systems in one): | ||
- | |||
- | < | ||
- | $ aptitude install x2gothinclientmanagement | ||
- | # take a look at the X2go TCE config and modify to your needs | ||
- | $ vim / | ||
- | $ x2gothinclient_create | ||
- | # now you have to wait for some time, loads of things | ||
- | $ x2gothinclient_preptftpboot | ||
- | # follow the instructions being shown at the end of the x2gothinclient_preptftpboot script run... | ||
- | </ | ||
- | |||
- | === Basic installation of the X2go PXE server === | ||
- | |||
- | Now a bit more in detail... | ||
- | |||
- | - Install a Debian squeeze system from the Debian Installer (CD/DVD). For downloading Debian, please visit this site: http:// | ||
- | - Then add the X2go repository to your freshly installed X2go PXE server ([[adding the X2go repository (Debian)]]). For your convenience, | ||
- | - The only X2go related package needed on the X2go PXE server is the package: '' | ||
- | $ apt-get install x2gothinclientmanagement | ||
- | Reading package lists... Done | ||
- | Building dependency tree | ||
- | Reading state information... Done | ||
- | The following extra packages will be installed: | ||
- | atftpd debootstrap inetutils-inetd libcrypt-passwdmd5-perl libdigest-sha1-perl libfile-copy-recursive-perl nfs-kernel-server syslinux syslinux-common update-inetd | ||
- | Suggested packages: | ||
- | dosfstools mtools dhcp3-server dnsmasq isc-dhcp-server | ||
- | Recommended packages: | ||
- | inet-superserver | ||
- | The following NEW packages will be installed: | ||
- | atftpd debootstrap inetutils-inetd libcrypt-passwdmd5-perl libdigest-sha1-perl libfile-copy-recursive-perl nfs-kernel-server syslinux syslinux-common update-inetd x2gothinclientmanagement | ||
- | 0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded. | ||
- | Need to get 1855 kB of archives. | ||
- | After this operation, 5353 kB of additional disk space will be used. | ||
- | Do you want to continue [Y/n]? | ||
- | </ | ||
- | |||
- | === Building the X2go Thin Client system (the so-called chroot environment) === | ||
- | |||
- | - After installation of the '' | ||
- | $ editor / | ||
- | </ | ||
- | - When done, start the creation of a fresh X2go Thin Client chroot environment:< | ||
- | $ x2gothinclient_create | ||
- | </ | ||
- | - Now you will be able to observe a medium long installation process on your system. This installation process takes place in a chroot jail environment, | ||
- | - During installation you will be asked to configure your keyboard and your thin client' | ||
- | - After the chroot installation of your X2go Thin Client, you will notice a folder structure such as this on your X2go PXE server:< | ||
- | root@pxeserver:/ | ||
- | . | ||
- | └── x2gothinclient | ||
- | ├── chroot | ||
- | │ ├── bin | ||
- | │ ├── boot | ||
- | │ ├── dev | ||
- | │ ├── etc | ||
- | │ ├── home | ||
- | │ ├── initrd.img -> boot/ | ||
- | │ ├── lib | ||
- | │ ├── media | ||
- | │ ├── mnt | ||
- | │ ├── opt | ||
- | │ ├── proc | ||
- | │ ├── root | ||
- | │ ├── sbin | ||
- | │ ├── selinux | ||
- | │ ├── srv | ||
- | │ ├── sys | ||
- | │ ├── tmp | ||
- | │ ├── usr | ||
- | │ ├── var | ||
- | │ ├── vmlinuz -> boot/ | ||
- | │ └── x2go_tc_install.sh | ||
- | └── etc | ||
- | ├── x2gothinclient_init | ||
- | ├── x2gothinclient_sessions | ||
- | └── x2gothinclient_start | ||
- | </ | ||
- | - Next, you may take a look at the files in the folder ''/ | ||
- | - '' | ||
- | - '' | ||
- | - '' | ||
- | $ scp ~/ | ||
- | </ | ||
- | - When done with all your customizations execute the '' | ||
- | $ x2gothinclient_update | ||
- | </ | ||
- | |||
- | With this last step your X2go Thin Client' | ||
- | |||
- | === Boot environment for your X2go Thin Client system (PXE, TFTP) === | ||
- | |||
- | As we do not want our software to interfere with other PXE bootable systems (like LTSP for example) we only ship an exemplary TFTP/PXE configuration in the doc section of the '' | ||
- | |||
- | < | ||
- | $ cd / | ||
- | $ ls -al | ||
- | </ | ||
- | |||
- | |||
- | |||
- | --- WORK IN PROGRESS --- | ||
- | |||
- | ===== X2go TCE / Debian lenny ===== | ||
- | |||
- | :!: **Debian lenny currently is Debian' | ||
- | |||
- | X2goclient can be used as a display manager. If you combine this feature with a boot environment, | ||
- | |||
- | < | ||
- | # apt-get install dhcp3-server atftpd nfs-kernel-server debootstrap | ||
- | </ | ||
- | |||
- | You'll need a directory to install the boot environment. You can choose a directory of your choice, but this manual will describe the installation inside “/ | ||
- | |||
- | < | ||
- | # mkdir / | ||
- | </ | ||
- | |||
- | You can populate the directory by running the command “debootstrap”: | ||
- | |||
- | < | ||
- | # debootstrap --arch i386 lenny / | ||
- | </ | ||
- | |||
- | Adding a name server entry will help you accessing the Internet inside the chroot environment: | ||
- | |||
- | < | ||
- | # cp / | ||
- | </ | ||
- | |||
- | You'll also need some network device: | ||
- | |||
- | < | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | auto lo | ||
- | iface lo inet loopback | ||
- | </ | ||
- | |||
- | And a host name as well as an entry of your system inside /etc/hosts: | ||
- | |||
- | < | ||
- | # echo x2gothinclient > / | ||
- | # echo " | ||
- | </ | ||
- | |||
- | You also need the x2goserver inside /etc/hosts: | ||
- | |||
- | < | ||
- | # echo " | ||
- | </ | ||
- | |||
- | and access to the x2go repository: | ||
- | |||
- | < | ||
- | # echo "deb http:// | ||
- | </ | ||
- | |||
- | :!: **Warning!** | ||
- | > Please make sure that you continue working inside the boot environment. If you execute commands inside your real system, you may make it inaccessible! | ||
- | |||
- | The following command will take you inside the boot environment | ||
- | |||
- | < | ||
- | # chroot / | ||
- | </ | ||
- | |||
- | To get things working you'll need /proc and /dev directories. You may also use hardlinks created outside the chroot environment: | ||
- | |||
- | < | ||
- | # mount -t proc none /proc | ||
- | # mount -t devpts none /dev/pts/ | ||
- | </ | ||
- | |||
- | Debootstrap didn't install a kernel, which is needed to start the boot environment: | ||
- | |||
- | < | ||
- | # aptitude update | ||
- | # aptitude install syslinux locales linux-image-486 | ||
- | </ | ||
- | |||
- | If you would like to use a keymap other than us_US, you'll need to reconfigure the locales: | ||
- | |||
- | < | ||
- | # dpkg-reconfigure locales | ||
- | </ | ||
- | |||
- | The system will be started via network, so it is necessary to tell the initramfs about your plans: | ||
- | |||
- | < | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | Modify to : BOOT=nfs | ||
- | </ | ||
- | |||
- | The new configuration needs to be applied and the initramfs needs to be newly generated: | ||
- | |||
- | < | ||
- | # update-initramfs -u -v | ||
- | </ | ||
- | |||
- | The package x2gothinclientsystem will install a system daemon which will start x2goclient as a display manager. It will further start a deamon which will be responsible for mounting local mass storage devices automatically. | ||
- | |||
- | < | ||
- | # apt-get install x2gothinclientsystem | ||
- | # cd / | ||
- | # ./ | ||
- | </ | ||
- | |||
- | This will finish the installation of the boot environment. Before exiting the chroot environment, | ||
- | |||
- | < | ||
- | # umount /proc/ | ||
- | # umount /dev/pts/ | ||
- | </ | ||
- | |||
- | Set a root password. You can change this again later by entering the chroot environment. | ||
- | |||
- | < | ||
- | # passwd | ||
- | </ | ||
- | |||
- | |||
- | The command “exit” will leave the chroot boot environment. If you discover any problems, you can always go back inside the boot environment by using “chroot” as described (for example for system upgrades): | ||
- | |||
- | < | ||
- | # exit | ||
- | </ | ||
- | |||
- | ==== Configuration of DHCPD ==== | ||
- | |||
- | If you already have an DHCP server in your network, please make sure that you are able to setup an own range of IP addresses for the boot environment. Because of the conflict between devices that should access the boot environment and normal network nodes (MAC address binding), it is much easier to setup an own network for your thin client system. The following example assumes that you are running the DHCPD and the ATFTPD on the same system. | ||
- | |||
- | < | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | option domain-name " | ||
- | option domain-name-servers 192.168.1.1; | ||
- | # x2go thin client range/group | ||
- | subnet 192.168.0.0 netmask 255.255.255.0 { | ||
- | range 192.168.0.100 192.168.0.199; | ||
- | filename "/ | ||
- | next-server 192.168.0.250; | ||
- | } | ||
- | </ | ||
- | |||
- | Restart the DHCPD to apply the new configuration: | ||
- | |||
- | < | ||
- | # / | ||
- | </ | ||
- | |||
- | ==== Setting up atftp ==== | ||
- | |||
- | After receiving a network address from the DHCP daemon, a kernel will be deployed using the tftp protocoll. For this purpose, you'll need to configure the **atftpd**, so that the kernel can be found. Please make sure, that **atftp** ist started by an init script and not via inet.d. | ||
- | |||
- | < | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | USE_INETD=false | ||
- | OPTIONS=" | ||
- | </ | ||
- | |||
- | You'll need a directory to store the necessary kernel which should be world readable (=public). | ||
- | |||
- | < | ||
- | # mkdir /tftpboot | ||
- | # chmod 755 /tftpboot | ||
- | </ | ||
- | |||
- | If inet.d was installed and used on your system, please make sure that it is not starting or runnig **atftp** when you start it directly: | ||
- | |||
- | < | ||
- | # / | ||
- | </ | ||
- | |||
- | If you don't want to make copies of the kernel and initrd files, just use symbolic links – that is a good idea, if you plan to maintain the boot environment: | ||
- | |||
- | < | ||
- | # ln -s / | ||
- | # ln -s / | ||
- | </ | ||
- | |||
- | The configuration file of **atftp** needs to be created and edited. Please change the IP address if necessary! | ||
- | |||
- | < | ||
- | # mkdir / | ||
- | # touch / | ||
- | # cp / | ||
- | </ | ||
- | |||
- | < | ||
- | # touch / | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | label linux | ||
- | kernel vmlinuz | ||
- | append root=/ | ||
- | </ | ||
- | |||
- | ==== Configuration of the NFS share ==== | ||
- | |||
- | The root file system of the boot environment is mounted using NFS (so it can be accessed over the network). You'll need to export the needed directory by editing the NFS configuration file: | ||
- | |||
- | < | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | / | ||
- | </ | ||
- | |||
- | Finally restart the NFSD: | ||
- | |||
- | < | ||
- | # / | ||
- | </ | ||
- | |||
- | ==== Configuration of x2goclient (display manager mode) ==== | ||
- | |||
- | Please also edit the command line options used by the x2goclient running in display manager mode (for example: change the IP address). | ||
- | |||
- | < | ||
- | # vi / | ||
- | </ | ||
- | |||
- | < | ||
- | x2goclient --pgp-card -ldap=" | ||
- | </ | ||
- | |||
- | ==== Alternative configuration of x2goclient (display manager mode without LDAP) ==== | ||
- | This is an optional setup if you want to avoid the needed LDAP server configuration. Please choose only one of the two display manager mode options! | ||
- | |||
- | === Create the needed sesssion === | ||
- | You should start by creating a session with a x2goclient. You should only create the needed session if you want to deny users to choose between different sessions. If you don't use the x2goclient user inside the boot environment, | ||
- | |||
- | < | ||
- | $ cat ~/ | ||
- | </ | ||
- | |||
- | < | ||
- | [20070226145202980] | ||
- | host=x2goserver | ||
- | command=KDE | ||
- | fullscreen=true | ||
- | layout=de | ||
- | name=X2Go Session | ||
- | pack=16m-jpeg | ||
- | quality=9 | ||
- | sound=true | ||
- | speed=2 | ||
- | sshport=22 | ||
- | type=pc105/ | ||
- | usekbd=true | ||
- | rootless=false | ||
- | soundsystem=pulse | ||
- | startsoundsystem=true | ||
- | soundtunnel=true | ||
- | fstunnel=true | ||
- | defsndport=true | ||
- | sndport=4713 | ||
- | </ | ||
- | |||
- | |||
- | < | ||
- | x2goclient --no-session-edit --session=" | ||
- | </ | ||
- | |||
- | There are two commandline arguments you should be aware in this configuration. **--no-session-edit** will deny any manipulation of the session by the user. **--session=" | ||
- | |||
- | You are done! | ||
- | |||
- | PXE Boot enabled devices should now boot into the configured environment and show the x2goclient in display manager mode. If there are problems to start x.org, you may need to add missing drivers to the boot environment. | ||
- | |||
- | |||