Using LTSP in linux to implement a diskless Terminal Server System

Source: Internet
Author: User
In linux, LTSP is used to implement the diskless Terminal Server System-Linux Enterprise Application-Linux server application information. The following is a detailed description. Based on Red Hat Linux and LTSP Terminal Server software packages (see http: // www.ltsp.org), it is easy to install and configure. K12LTSP follows the GNU General Public License release, which means it is free and based on open source software. Once installed, K12LTSP allows you to boot multiple diskless workstations from an application server, and these diskless customers can use old PCs or purchase them at a very low price. All applications run on the terminal server. In contrast, those workstations are very "Meager" and there is no software or hard drive on them. These meager clients are extremely suitable for schools because they are very easy to assemble and require almost no maintenance. They are very reliable and will not be affected by malicious damages or computer viruses.
Use K12 LTSP 4.2 (Fedore Core 4.

The ltsp-4.2u2-0 version of the installation CD (ISO) file can go to the license.

If you only use LTSP 4.2, you can also renew.
Installing from the LTSP_4.2u2 ISO image
You MUST install a new version of the ltsp-utils package. At least version 0.20 of the ltsp-utils package (containing version 0.15 of ltspadmin) is required.
LTSP-4.2 must be installed to a new directory. you cannot do an in-place upgrade. but this is actually a great way to do it. you can install LTSP-4.2 into a new subdir, such as/opt/ltsp-4.2, and then update the filename and root-path entries in dhcpd. conf to point to the new LTSP tree. this is a great way to test it, because you can change those dhcpd. conf entries for individual workstations very easily. meanwhile, your other workstations will continue to function using the older version of LTSP.
To install LTSP-4.2, following these instructions:
Download and install the latest ltsp-utils package (ltsp-utils was updated to version 0.25 on each l 17th, 2006)
China Mirror
Debian-Download official deb
Debian-Download deb
Ubuntu-Download deb
Redhat/Fedora-Download RPM
Slackware-Download TGZ (contributed by martijn at inlv dot org)
Others-Download TGZ
As root, run ltspadmin.
If you have a previous version LTSP already installed, it is recommended that you install the ltsp-4.2 packages into a separate directory, such as:/opt/ltsp-4.2. you can configure this with the ltspadmin utility.
Install ALL of the packages
Choose the 'configure LTSP 'menu item, which will cause it to run the ltspcfg utility. Use this utility to setup the services.
Installing from the LTSP_4.2u2 ISO image
An ISO image of the LTSP-4.2u2 packages has been created for those who want to download a single file, and install it on multiple servers, without requiring additional downloads.
Installing LTSP from the ISO image:
1. Download the ISO image from the ISO download page China Mirror ltsp-4.2u2-0.iso 06-Jul-2006 100 MB. Save it on your system. For this example, we'll put it in/tmp. Download md5sum
2. make sure you are either logged in as root, or you 've switched to super user using su-(Notice the '-', it's important) # download the ISO file to a directory
3. Run md5sum on the downloaded file, and make sure the result matches the number in the. md5sum file that accompanies the ISO image.
Md5sum # Verify MD5 authenticity
4. Mount the ISO image, using the loopback device:
Mount-o loop/tmp/ltsp-4.2u2-0.iso/mnt # mount the downloaded ISO file to a directory in linux
5. Install the ltsp-utils package. It's already ded in the ISO image.
If your system is RPM based (Redhat, Suse, Mandriva...) you can install the ltsp-utils RPM package:
Cd/mnt/ltsp-utils # Open the installation directory of ltsp-utils
Rpm-ivh ltsp-utils-0.25-0.noarch.rpm # Install the ltsp RPM package
Or, if you 've got a Debian based system, you can install the. deb package:
Cd/mnt/ltsp-utils
Dpkg-I ltsp-utils_0.25_all.deb # Or DEB package with ltsp installed
Or, if your system doesn't support either the RPM or the DEB package, you can install teh TGZ package:
Cd/mnt/ltsp-utils
Cp ltsp-utils-0.25-0.tgz/tmp
Cd/tmp
Tar xvzf ltsp-utils-0.25-0.tgz
Cd ltsp-utils
./Install. sh # Or decompress TGZ to install ltsp
6. Run * ltspadmin as root. # Run the ltspadmin command
7. From the main menu in ltspadmin, choose:
Configure the installer options # select the configuration option menu (option 2)
8. Specify the pathname to the files:
File: // mnt # enter this file: // mnt, and press Enter.
Notice that the value MUST be in the form of a URL, and also, notice that there are 3 slashes '///'. the first 2 slashes are part of the URL specification ("file: //"), the 3rd slash is for the root directory on your server.
9. Leave the remaining options as is.
10. if you have a previous version of LTSP (Pre-LTSP-4.2) already installed, it is recommended that you install the LTSP-4.2u2 packages into a separate directory, such as/opt/ltsp-4.2. you can configure this with the ltspadmin utility.
11. Install ALL of the packages. # Install ALL the packages (option 1)
12. Choose the 'configure LTSP 'menu item, which will cause it to run the ltspcfg utility. Use this utility to setup the necessary services. # Configure ltsp (third option)
13. Unmount the ISO image from/mnt:
Umount/mnt # unmount
Please report any problems you have with this ISO iage to the ltsp-discuss mailing list, or contact me on the # ltsp IRC channel on irc.freenode.net.



The following services are required:

XFree: called X terminal
DHCP: DHCP is a protocol used to automatically configure a computer that uses TCP/IP, and is used by ltsp to assign an IP address to the workstation.
NFS: NFS is a protocol that allows access to the hard disk through the network. It is used by ltsp to load the basic system for the workstation.
TFTP: TFTP is a simple file transfer protocol, which is used by ltsp to transmit the kernel to the workstation.
XINETD: Xinetd is a powerful replacement of inetd. It has more advanced features and is used by ltsp to start tftp.



NFS configuration: edit your/etc/exports file to allow the workstation to load the root file system. There must be at least two rows:

# Vi/etc/exports

/Opt/ltsp/i386 10.0.2.0/255.255.255.0 (ro, no_root_squash, async)
/Var/opt/ltsp/swapfiles 10.0.2.0/255.255.255.0 (rw, no_root_squash, async)


Note: You can change the network and mask settings to adapt to your network.





Start nfs

# Rc-update add nfs default
#/Etc/init. d/nfs start



Xinetd/tftp configuration: by default, TFTP will not start. To change this, edit/etc/xinetd. d/tftp.

# Vi/etc/xinetd. d/tftp # Replace disable = yes with disable = no. Then start xinitd.

Start xinetd

# Rc-update add xinetd default
#/Etc/init. d/xinetd start



DNS configuration: In order for the workstation to access all resources, correct name resolution is required. There are several methods to achieve this. One is to configure the DNS server for the local network, and the other (simpler) is to use almost identical/etc/hosts files on all systems. We adopt the latter solution. All workstations must be listed in/etc/hosts. Let's look at the example:

# Vi/etc/hosts

127.0.0.1 localhost
10.0.2.254 server server.yourdomain.com
10.0.2.1 ws-1 ws-1.yourdomain.com
DHCP configuration: In my opinion, this is the most complex step. You need to establish a valid DHCP configuration (/etc/dhcp/dhcpd. conf ). Here is an example:
# Vi dhcpd. conf // general options
Default-lease-time 21600;
Max-lease-time 21600;
Use-host-decl-names on;
Ddns-update-style ad-hoc;
// Bootp options
Allow booting;
Allow bootp;
// Network options
Option subnet-mask limit 255.0;
Option broadcast-address 10.0.2.255;
Option routers 10.0.2.202;
Option domain-name-servers 10.0.2.202;
Option log-servers 10.0.2.254;
Option domain-name "yourdomain.com ";
// LTSP Path Options
Option root-path "10.0.2.202:/opt/ltsp/i386 ";
Filename "tftpboot/lts/vmlinuz-2.6.17.3-ltsp-1 ";
// If your workstation has an ISA Nic, uncomment the following line // and select your driver and IO
# Option-128 code 128 = string;
# Option-129 code 129 = text;
# Options option-128 e4: 45: 74: 68: 00: 00;
# Option-129 "NIC = ne IO = 0x300 ";
Shared-network WORKSTATIONS {
Subnet 10.0.2.0 netmask 255.255.255.0 {
// Dynamic IP address assigned to the workstation
Range dynamic-bootp 10.0.2.100 10.0.2.200;
// Workstation-specific PXE boot Configuration
# Host ws001 {
# Hardware ethernet 00: E0: 06: E8: 00: 84;
# Fixed-address 10.0.2.1;
#}
}
}

If your workstation supports PXE, you should list each of them, as I did in host ws001 (don't forget to cancel the comment ). Do not give them addresses in a dynamic range. Otherwise, the Workstation may have the same IP address (which may be faulty ).
For more documentation on this project, please read the dhcp official manual: http://www.dhcp-handbook.com/
Start DHCP now, just as you do in NFS and xinetd:
Start dhcp # rc-update add dhcp default
#/Etc/init. d/dhcp start
Note: DHCPD requires CONFIG_PACKET and CONFIG_FILTER to be activated in the kernel.
LTSP configuration: There are many options to configure your workstation, view the http://www.ltsp.org/documentation/ltsp-3.0-4-en.html#AEN903 to get the full description of/opt/ltsp/i386/etc/lts. conf. Display Manager now you need to change your Display Manager Configuration to accept remote connection. First, modify your Xaccess file and remove the comment in the next line: # vi/etc/Xaccess # any host can get a login window
Now modify the Display Manager configuration you are using: XDM: Comment out DisplayManager in/etc/X11/xdm-config. requestPort: 0KDM: Find [Xdmcp] in/usr/kde/3.1/share/config/kdm/kdmrc and change Enable = false to Enable = true. & Lt; M & gt; & lt;/etc/X11 & gt; em & gt;/& lt; & gt; & lt;/etc/X11 & gt; & lt; & gt; conf & gt. Then start the Display Manager: Start xdm # rc-update add xdm default
#/Etc/init. d/xdm start warning: it seems that there are some problems with XDM and gmt1. The author uses KDM to solve these problems. Create boot floppy disk if your workstation does not support PXE boot, you must create a boot floppy disk that is required when you start your workstation. Go to http://www.rom-o-matic.net/5.0.9/, select elastic NIC, and press Get ROM to write the image to a floppy disk: Write a floppy disk image # cat nicfile. lzdsk>/dev/fd0
The following is an automatic configuration file:
/Etc/dhcpd. conf automatically generates a/etc/dhcpd. conf. sample file, correct your_domain.org in the following line to my real domain-name = server. and copy it to/etc/dhcpd. conf.
Option domain-name "your_domain.org"; # You really shocould fix
Option domain-name "server"; # You really shocould fix this
Other configuration files are automatically generated.
/Etc/hosts
/Etc/hosts. allow
/Etc/exports
/Opt/ltsp/i386/etc/lts. conf




In general, the speed is relatively fast. An old-fashioned PII enters the X window in just a few seconds.
The speed of openoffice is almost the same as that of P4 servers, which makes old computers useless. It is really the first choice for the transformation of primary and secondary computer classrooms.
Because DRBL is installed first, you must perform the following steps to enable LTSP:
#/Opt/drbl/sbin/drbl-all-service stop drbl and stop the following services at the same time:
Stopping xinetd: [OK]
Stopping portmap: [OK]
Flushing firewall rules: [OK]
Setting chains to policy ACCEPT: filter nat [OK]
Stopping YP server services: [OK]
Shutting down NIS services: [OK]
Stopping YP passwd service: [OK]
Stopping YP map server: [OK]
Shutting down NFS mountd: [OK]
Shutting down NFS daemon: [FAILED]
Shutting down NFS quotas: [OK]
Shutting down NFS services: [OK]
Stopping NFS locking: [OK]
Stopping NFS statd: [OK]
Shutting down ntpd: [OK]
Restart the following services:
# Dhcpd enable dhcp
#/Etc/rc. d/init. d/portmap start enable portmap nfs
# Service xinetd restart httpd tftp
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.