Installating and Configuring the Server
Dynamic Host Configuration Protocol
Every computer on a local area network (LAN) needs to have a unique IP address (see Section ...) so that it may send and receive data. The Dynamic Host Configuration Protocol (DHCP) is a networking protocol that allocates IP addresses dynamically to computers on a LAN. Without it, an administrator needs to give each client computer a static IP address manually. This may seem simple enough to begin with, but given time, it slowly turns into a nightmare: computers are added, removed or moved about, and the number assignments eventually become arbitrary and troublesome to keep track of. On a network with manually assigned addresses, it's also awkward to connect transient devices such as laptop computers that are also used on many other networks. You have to talk to the system administrator to find out the network configuration, and then check the network to find a free address. With DHCP, it's easy: just plug in an Ethernet cable for the new device, and it will immediately request an IP address from the classroom server, which will assign an unused number to it.
In an Edubuntu lab, the classroom server is configured as a DHCP server. A system administrator assigns a range of IP addresses to the server. Each client computer on the LAN has its TCP/IP software configured to request an IP address automatically from the DHCP server when that client computer starts up. The request-and-grant process uses a lease concept with a controllable time period. This eases the network installation procedure on the client computer side considerably.
In addition to the IP address, a DHCP server can set other configuration information, such as the address of the DNS server, the DNS domain of the client, and the gateway IP address, so that the client computer can be fully functional.
Before I continue, let me explain the concepts I've just introduced. First, the DNS domain: all Linux computers are given a hostname upon installation of the OS, which is used in system messages and configuration. When the computer joins a network, its hostname and the domain of the network together combine to form the Fully Qualified Domain Name (FQDN) of the computer.
Secondly, the gateway IP address. In Section ... I explained that the internet is a network of networks. For data packets from a computer on one network to reach a server on another network, there needs to be a gateway that is connected to both networks at once. Usually, the gateway computer will have a network card for every network to which it is connected.
By default, the Edubuntu server uses its first network card (eth0, numbered from 0 like most things in the computer world) for the classroom LAN. It runs DHCP on this card, and automatically gives out IP numbers upon request. It then accepts BootP (Boot Protocol) and PXE (Pre-boot eXecution Environment) boot requests, and passes on the Linux kernel to the client using TFTP for the transfer. Once the client has received the kernel, it boots into Linux. The default dhcpd.conf file will support over 200 clients. The LTSP server will not answer DHCP requests over eth1 (with the default settings.)
Files
The configuration settings for the DHCP server are contained in the /etc directory --- standard Linux location for configuration data --- in the file /etc/dhcpd.conf. XXX which settings in here should be explained?
Network configuration
- The first network card, eth0, is the interface on the thin-client side of your LTSP server. This network card connects to your terminal hub. The 192.168.0.x address range is designated as a "private" IP range for internal networks. It is not routed on the internet. IP traffic from your clients are routed to the internet through eth1. (Note that if there is a Wizzy server, it will be the one with the two network cards.)
The classroom server has the last available address in this range, namely 192.168.0.254 (192.168.0.255 is the broadcast address: packets sent to this address reach all the computers on the network). The first client will be assigned an IP number of 192.168.0.253. (16)
(XXX: make a local one) Dialogue (screenshot):
Wizzy network configuration
When the Edubuntu lab has a Wizzy server, there are a couple of other aspects to network configuration.
Network Filesystem
Edubuntu lab uses NFS, the Network Filesystem, to make the home directories of lab users appear to be local to the client workstations, even though they really reside on the classroom server. The NFS configuration is specified in the file /etc/exports on the classroom server.
LTSP configuration
The LTSP configuration is specified in the file lts.conf on the classroom server. For more detail about this file, see Section 13.5.
Users and groups
All the users of the Edubuntu lab will have accounts on the classroom server. (Additionally, if they have email they will have accounts stored in the Wizzy server's LDAP directory.)
XXX: who adds them? Root? Using some RedHat config tool?
Permissions
Access to directories, files and executable programs under Linux is managed in terms of users, groups and permissions. Every user belongs to a group, and every file belongs to a user and a group. The basic permissions are read, write and execute. For every file and directory, these permissions can be set for the user who owns the file, the group, and for all others (i.e. everyone but the owner or the group). For example, here are the permissions of a user's home directory:
jean@klippie jean $ ls -ld /home/jean
drwxr-xr-x 112 jean users 6664 Des 26 17:31 /home/jean
The permissions are shown by the string drwxr-xr-x. The first character, d, indicates that this is a directory. You should read the following 9 characters in groups of three, that show the permissions for the owner jean (rwx), the group users (r-x), and all others (r-x). In this case, the owner has read (r), write (w) and execute (x) permissions, while the group and others only have read and execute permissions. In the case of a directory, execute permissions means that you are allowed to access the contents of the directory. This home directory may therefore be read by everyone, but only the user may change it.
Here are the permissions on the file that contains the system user database:
jean@klippie jean $ ls -l /etc/passwd
-rw-r--r-- 1 root root 2118 Des 1 05:32 /etc/passwd
These indicate firstly that this is a regular file, not a directory (the leading -), and that the owner root has read and write permissions (rw-), and everyone else have only read permissions (r--). In effect, this means that only the root user may add, modify or delete users.
You may further note that the group to which this file belongs is also root. This group only has one member (the root user), and is used for files that are under control of only this unique user.
Administrative Users
Every Linux machine normally has a user called root, who has all permissions. When a system administrator needs to do maintenance, they log in as root only to make the necessary changes, and then switch to their regular user again.
Printing
Developing a backup procedure
The importance of backing up a system can never be stressed enough. You never know when the power may cut out or the hard drive may crash. Even though you can restore the operating system from the distribution CD-ROM, there are other files that you need to consider. What about the configuration changes that you made? There are also files created by users, what about those?
Follow these steps to create a backup plan:
- Make a list of the files and directories that you need backups of. You'll always want to backup system configuration files in the /etc directory, other configuration files may be found in /usr/lib. In addition, you may want to backup user files in the /home directory as well as the superuser (root) files in /root.
- Find a few tools to use when backing up and archiving files and directories. Several tools are available that will archive a group of files, and there are tools that will compress files and archives.
- Decide how often the system and individual files need to be backed up. How often do your files change? If files change frequently, the your backup frequency should match the change frequency. So, you may need to perform a backup every day. If you only make one or two configuration changes on occasion, you can easily backup the configuration files only when the changes is made.
- Select a storage medium that will store the backup file. If you have a few files to backup, you could just store them on a floppy disk. If you have more files, or larger files, you can consider using a zip drive or a CD-RW drive.
- Store the files in a safe place. The safest place to store the backup media is at a location different from where the computer is located. To be really safe, this location needs to be protected from fire and other hazards. You may also want to keep a copy of the backup files close by so that you can quickly restore lost files.
Tip: Always make a copy of configuration files before you make any configuration changes. That way, should your new settings not work, you can restore the old configuration files.