Thin Client

From PC-BSD Wiki
(Redirected from ThinClientServer)
Jump to: navigation, search
Previous: Warden® Return to Table of Contents Next: Common Tasks
Thin Client

Contents


Beginning with PC-BSD 9.0, a script to create a thin client server is included with the operating system. This allows your PC-BSD system to automatically configure a network of diskless computers. Each computer will need a network interface card capable of PXE booting. Once connected, users at these workstations can access and modify the contents of their home directory, which is saved on the thin client server, as well as run any applications which have been installed on the PC-BSD system.

Building the Thin Client Server

To prepare your PC-BSD system for thin client server configuration, perform these tasks first:

1. If the diskless clients will require Internet access, install two network cards where one NIC is connected to the Internet and the other is connected to a private LAN from which the thin clients can PXE boot from.

2. The PC-BSD system should have lots of RAM installed, especially if multiple clients will be connecting. It is recommended to use a 64-bit system with as much RAM installed as possible.

3. Make sure system ports is installed in /usr/ports/. If this directory is empty or does not exist, you can install ports using the "Fetch System Ports Tree" button in the Tasks tab of System Manager.

4. Set aside a few hours as the system will need to rebuild its "world" and the applications it needs in order to support the PXE environment. The script will automatically build a 32-bit environment (even on a 64-bit system) as most PXE boot clients are 32-bit.

To configure the PC-BSD system as a PXE server, run the following script as the superuser:

pc-thinclient
/usr/local/bin/pc-thinclient will install the components to convert this system into a thin-client server. 
Continue? (Y/N) y

If you have not installed a DHCP server, a menu will appear where you can select the configure options for the DHCP server. Use your arrow keys to navigate to an option and the enter key to toggle between selecting and deselecting the highlighted option. If you're unsure, leave the options at their default settings. When finished, use the tab key to navigate to OK and press enter to start the build of the DHCP server. Once the DHCP server is installed, the script will build the tools needed in the PXE environment:

Fetching FreeBSD environment... This may take a while...
Extracting FreeBSD environment... This may take a while...
Copying /usr/ports -> /home/thinclient/usr/ports
<snip long output>
Setting up system for PXE booting...
What NIC do you wish DHCPD to listen on? (I.E. re0) em0

Input the name of the interface that is attached to the local network containing the diskless workstations. In the example shown here, the user has input the em0 interface. The script will now configure the specified interface and start the required services:

Starting /etc/rc.d/nfsd...OK
Starting /etc/rc.d/inetd...OK
Starting /usr/local/etc/rc.d/isc-dhcpd...OK
Your system is now setup to do PXE booting! Reboot for all the changes to take effect.

You can now reboot the system into the new PXE environment.

The thin client script installed and configured the following services:

NFS: the Network File System is a protocol for sharing files on a network. It has been configured to allow clients on the network attached to the interface that you specified to connect to the thin client server. Its configuration file is located in /etc/exports.

TFTP: the Trivial File Transfer Protocol is a light-weight version of FTP used to transfer configuration or boot files between machines. The PXE network cards on the diskless computers will use TFTP to receive their configuration information. This service was enabled in /etc/inetd.conf with a home directory of /home/thinclient.

DHCP: the Dynamic Host Configuration Protocol is used to configure IP addressing info on the diskless workstations. It has been configured to assign addresses for the network attached to the interface that you specified. Its configuration file is located in /usr/local/etc/dhcpd.conf.

The thin client script also created the pxeboot user with the default password thinclient. This username and password is used to save the working Xorg configuration files for each of the diskless computers. It is highly recommended that you change this password right away by running this command as the superuser:

passwd pxeboot

Using the Thin Client Server

Using the Thin Client Server is relatively easy. After a successful installation and reboot of the server, DHCPD should now be running on the NIC you specified during the installation. Simply connect a hub/switch to this NIC and connect a PXE capable system to the switch. When you boot the thin client system, PXE should obtain an IP address and begin to load PC-BSD.

After the boot process has finished, the client will be brought to this prompt:

No saved xorg-config for this MAC: <Mac Address>
Do you wish to setup a custom xorg.conf for this system? (Y/N)

If you wait 10 seconds, this message will timeout, and the client will bring up X in 1024x768 mode. However, if this isn't the resolution you wish to use, type "Y" and hit enter to bring up the Xorg Configuration screen. In this menu, you will be able to setup your own custom xorg.conf file, auto-detect settings, and test the new configuration.

After you have tested the Xorg configuration for the client, choose "Save working config" to send this configuration to the Server. You will be prompted for the password of the pxeboot user. The file will be saved by the client's MAC address in /home/pxeboot/mnt/xorg-config/<mac>.conf. Now when you reboot the client, it will automatically startup using this saved xorg.conf file and bring the system to the login screen.

The client's boot environment is located in /home/pxeboot. This is mounted read-only during the PXE boot process to allow the client to bootup and create an XDCMP connection to the server.< larry edit test - subpage #2 >

Personal tools