This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:components:tce [2011/06/17 23:25] sunweaver [Installing X2go PXE server] |
wiki:components:tce [2011/11/17 21:36] sunweaver |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Installation of the X2go TCE based on Debian ====== | + | ====== 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/ | + | 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 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 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. | + | * 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 ===== | ===== 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, | + | 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 | + | You can combine |
- | <note important> | + | <note important> |
</ | </ | ||
- | A normal/ | + | A normal/ |
- | * X2go server (Debian, Ubuntu, etc.) | + | * X2Go server (Debian, Ubuntu, etc.) |
- | * optional: a separate | + | * optional: a separate |
- | * 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 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 ===== | + | ===== X2Go TCE / Debian squeeze ===== |
- | < | + | < |
- | In the following description we will describe a simple | + | In the following description we will describe a simple |
- | The resulting | + | The resulting |
:!: **Before you continue!** | :!: **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 | + | > 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 [[wiki:x2go-repository-debian|here |
- | ==== Installing | + | ==== Installing |
- | The X2go Server installation is described in detail on [[installing_x2goserver_debian_ubuntu|this wiki page]]. Please follow instructions there first, then proceed below. | + | The X2Go Server installation is described in detail on [[: |
- | Basically you have to install the '' | ||
- | < | + | ==== Installing |
- | $ apt-get install x2goserver gnome-desktop-environment plasma-desktop | + | |
- | </ | + | |
- | + | ||
- | ==== Installing | + | |
=== Summary === | === 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): | + | 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 | + | $ sudo aptitude install x2gothinclientmanagement |
- | # take a look at the X2go TCE config and modify to your needs | + | # take a look at the X2Go TCE config and modify to your needs |
- | $ editor / | + | $ sudo editor / |
- | $ x2gothinclient_create | + | $ sudo x2gothinclient_create |
# now you have to wait for some time, a lot of text will pass through your terminal window | # now you have to wait for some time, a lot of text will pass through your terminal window | ||
- | $ x2gothinclient_preptftpboot | + | $ sudo x2gothinclient_preptftpboot |
# follow the instructions being shown at the end of the x2gothinclient_preptftpboot script run... | # follow the instructions being shown at the end of the x2gothinclient_preptftpboot script run... | ||
</ | </ | ||
Line 66: | Line 61: | ||
- Install a minimal Debian GNU/Linux (squeeze) or Ubuntu GNU/Linux Server (lucid, maverick) system from CD/DVD. | - Install a minimal Debian GNU/Linux (squeeze) or Ubuntu GNU/Linux Server (lucid, maverick) system from CD/DVD. | ||
- | - Then add the X2go repository to your freshly installed X2go PXE server: [[adding the X2go repository | + | - Then add the X2go repository to your freshly installed X2go PXE server: [[:wiki:x2go-repository-debian|Debian]] |
- The only X2go related package needed on the X2go PXE server is the '' | - The only X2go related package needed on the X2go PXE server is the '' | ||
- | $ aptitude install x2gothinclientmanagement | + | $ sudo aptitude install x2gothinclientmanagement |
</ | </ | ||
Line 74: | Line 69: | ||
- After installation of the '' | - After installation of the '' | ||
- | $ editor / | + | $ sudo editor / |
</ | </ | ||
- When done, start the creation of a fresh X2go Thin Client chroot environment:< | - When done, start the creation of a fresh X2go Thin Client chroot environment:< | ||
- | $ x2gothinclient_create | + | $ sudo 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, | - 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 | + | - During installation you will be asked to configure your thin client' |
- | - After the chroot | + | - After the X2go TCE installation of your X2go Thin Client |
- | root@pxeserver: | + | - Next, you may take a look at the config |
- | . | + | |
- | └── x2gothinclient | + | |
- | ├── | + | |
- | │ ├── 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 ~/ | $ scp ~/ | ||
</ | </ | ||
- When done with all your customizations execute the '' | - When done with all your customizations execute the '' | ||
- | $ x2gothinclient_update | + | $ sudo x2gothinclient_update |
</ | </ | ||
Line 126: | Line 91: | ||
=== Boot environment for your X2go Thin Client system (PXE, TFTP) === | === 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 '' | + | With the '' |
< | < | ||
- | $ cd / | + | $ x2gothinclient_preptftpboot |
- | $ ls -al | + | |
</ | </ | ||
+ | If there already is a PXE boot environment installed at the configured location, the script will abort with a warning. If you want to combine X2go PXE with other boot environments (e.g. LTSP), please customize your system manually. Templates for X2go PXE can be found at ''/ | ||
+ | Note: At the end of the '' | ||
- | --- WORK IN PROGRESS --- | + | === Testing X2go TCE === |
- | ===== X2go TCE / Debian lenny ===== | + | You should now be able to start your office PCs as X2go Thin Clients. To do this, configure the computer' |
- | :!: **Debian lenny currently is Debian' | + | === Purging X2go TCE === |
- | X2goclient can be used as a display manager. If you combine this feature with a boot environment, | + | To get rid of all files related |
< | < | ||
- | # apt-get install dhcp3-server atftpd nfs-kernel-server debootstrap | + | $ x2gothinclient_cleanup |
</ | </ | ||
- | 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 “/ | + | ===== Tweaking |
- | < | + | ==== Configuration of DHCPD ==== |
- | # mkdir / | + | |
- | </ | + | |
- | You can populate | + | 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 a separate network sub-LAN (in the example below: 192.168.0.0/ |
< | < | ||
- | # debootstrap --arch i386 lenny / | + | $ sudo editor |
- | </ | + | |
- | + | ||
- | Adding a name server entry will help you accessing the Internet inside the chroot environment: | + | |
- | + | ||
- | < | + | |
- | # cp /etc/resolv.conf | + | |
- | </ | + | |
- | + | ||
- | You'll also need some network device: | + | |
- | + | ||
- | < | + | |
- | # vi / | + | |
</ | </ | ||
< | < | ||
- | auto lo | + | option domain-name "< |
- | iface lo inet loopback | + | option domain-name-servers |
- | </file> | + | |
- | 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 | # x2go thin client range/group | ||
subnet 192.168.0.0 netmask 255.255.255.0 { | subnet 192.168.0.0 netmask 255.255.255.0 { | ||
range 192.168.0.100 192.168.0.199; | range 192.168.0.100 192.168.0.199; | ||
- | filename "/ | + | |
- | next-server 192.168.0.250; | + | next-server 192.168.0.250; |
} | } | ||
</ | </ | ||
- | Restart the DHCPD to apply the new configuration: | + | Restart the DHCPD server |
< | < | ||
Line 293: | Line 141: | ||
</ | </ | ||
- | ==== Setting up atftp ==== | + | ==== Configuration of the NFS share ==== |
- | 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 root file system of the boot environment is mounted using NFSv3 (so it can be accessed over the network). You'll need to export |
< | < | ||
- | # vi /etc/default/ | + | $ sudo editor |
</ | </ | ||
< | < | ||
- | USE_INETD=false | + | / |
- | OPTIONS=" | + | |
</ | </ | ||
- | You'll need a directory to store the necessary kernel which should be world readable (=public). | + | Finally restart |
< | < | ||
- | # mkdir /tftpboot | + | $ sudo /etc/init.d/ |
- | # 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: | ||
- | < | + | ==== Configuration of x2goclient (display manager mode) ==== |
- | # / | + | |
- | </ | + | |
- | 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: | + | === x2goclient in LDAP-mode === |
- | < | + | Please |
- | # ln -s / | + | |
- | # ln -s / | + | |
- | </ | + | |
- | + | ||
- | The configuration file of **atftp** needs to be created and edited. | + | |
< | < | ||
- | # mkdir / | + | $ editor |
- | # touch / | + | |
- | # cp / | + | |
</ | </ | ||
- | < | + | The below example uses LDAP-mode for '' |
- | # touch / | + | |
- | # vi / | + | |
- | </ | + | |
< | < | ||
- | label linux | + | x2goclient --pgp-card \ |
- | kernel vmlinuz | + | --ldap="192.168.1.1: |
- | append root=/ | + | |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
</ | </ | ||
- | ==== Configuration of the NFS share ==== | + | After modifying |
- | + | ||
- | 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 | + | |
< | < | ||
- | # vi / | + | $ x2gothinclient_update |
</ | </ | ||
- | < | + | === x2goclient in non-LDAP mode === |
- | / | + | |
- | </ | + | |
- | Finally restart | + | The Debian GNU/Linux (squeeze) X2go TCE uses non-LDAP mode as default. Edit the default sessions file in ''/ |
- | < | + | There are two extra commandline arguments that you should be aware in the below configuration. |
- | # /etc/init.d/ | + | |
- | </ | + | |
- | ==== Configuration | + | * '' |
- | + | * '' | |
- | Please also edit the command line options used by the x2goclient running in display manager mode (for example: change | + | |
- | + | ||
- | < | + | |
- | # vi / | + | |
- | </ | + | |
< | < | ||
- | x2goclient --pgp-card -ldap="192.168.1.1: | + | x2goclient --no-session-edit \ |
+ | | ||
+ | | ||
+ | --external-login=/ | ||
+ | --no-menu | ||
+ | --maximize | ||
+ | --link=lan | ||
+ | --kbd-layout=de | ||
+ | --kbd-type=pc105/ | ||
+ | --set-kbd=1 | ||
+ | --geometry=fullscreen | ||
+ | --add-to-known-hosts | ||
+ | --read-exports-from=/ | ||
+ | --add-to-known-hosts | ||
</ | </ | ||
- | ==== Alternative configuration of x2goclient (display manager mode without LDAP) ==== | + | After modifying |
- | 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 | + | |
< | < | ||
- | $ cat ~/ | + | $ x2gothinclient_update |
</ | </ | ||
- | |||
- | < | ||
- | [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. | ||