A Computer Lab with No Windows, Part II
In Part I of this article, I outlined my reasons for building a Linux terminal server network for my classroom lab. I also began the explanation of how I set up the lab. Here's Part II.
With an Ultra320 SCSI port, we can connect as many as 15 hard drives to the bus. However, SCSI hard drives still are expensive, and it was beyond our budget to buy more than two hard drives. In my design, the second hard drive is for backup purposes only. I did not choose RAID 0 (data stripping for better performance) nor RAID 1 (mirroring), as I wanted to do the data backup manually.
Following a Linux mini how-to I found on hard-disk upgrades, I set up my second drive exactly the same as my first. I did not choose RAID 1 basically due to performance concerns. If RAID 1 is set up, every write (save to hard drive) triggers another write on the mirror disk and more time is needed. As for teaching purposes, my users' (student) data is important but not as critical as business data. Instead of having a second write each time a user saves his or her work on the server, I wrote a simple backup script and placed it under /etc/cron.daily. With it, all users' data is backed up to my second drive at 1:00am.
In order not to overload my Linux terminal server, I set up two more Linux servers, one for Apache and the other for a router and Squid. With the support of the Manitoba Chapter of Computers for Schools, I got two not-very-old servers for $75 each. One is an old Dell dual Pentium Pro server and the other is an IBM Netfinity server. I put 512MB of RAM in the router/Squid server, as I needed more RAM for Squid. With a few commands in iptables, I was able to re-route all Web requests to the Squid server without any setup required on students' workstation:
[root@router root]# cat /sbin/transquid.sh #!/bin/sh # written by C T Leung # November 15, 2002 # for basic NAT function + transparent proxy using squid # add this line to block all ip packets to/from chaos /sbin/route add -host chaos.wsd1.org reject IPTABLES="/sbin/iptables" # iptables binary INTIF="eth0" # internal interface EXTIF="eth1" # external interface # initialization of chains and rules $IPTABLES -F $IPTABLES -F INPUT $IPTABLES -F OUTPUT $IPTABLES -F FORWARD $IPTABLES -F -t nat $IPTABLES -X # delete any chains existing # setting default rules for each flow (in this case, accept everything) $IPTABLES -P INPUT ACCEPT $IPTABLES -P OUTPUT ACCEPT $IPTABLES -P FORWARD ACCEPT # adding masquerading function into "nat" chain # with this, all the locals can go out to Internet # through external interface (from internal interface) # at the same time, every connection goes to port 80 # will be redirected to 8080, squid proxy server #$IPTABLES -t nat -A POSTROUTING -s 192.168.1.110/24 -o $EXTIF -j MASQUERADE #$IPTABLES -I INPUT -s chaos.wsd1.org -j DROP echo 1 > /proc/sys/net/ipv4/ip_forward # to enable ip_forward by assigning 1 $IPTABLES -t nat -A PREROUTING -i $INTIF -p tcp --dport 80 -j REDIRECT --to-port 8080 # listing the chains and rules set by above lines $IPTABLES -L $IPTABLES -t nat -L
Most of the common programming languages, such as shell scripts, C and C++, are included in the LTSP download. If you want to have the latest Java development environment installed, however, you can download your choice of Java SDK from Sun and install it. Sun offers Java SDKs in both source as well as binary code. After installation, you might want to add a path to /opt/ltsp/i386/etc/lts.conf so any user can have access to the language. Here is mine configuration file as an example:
# # Config file for the Linux Terminal Server Project (www.ltsp.org) # # See lts.conf.readme for a description of each configuration item # [Default] SERVER = 192.168.1.253 XSERVER = auto X_MOUSE_PROTOCOL = "PS/2" X_MOUSE_DEVICE = "/dev/psaux" X_MOUSE_RESOLUTION = 400 X_MOUSE_BUTTONS = 2 X_USBMOUSE_PROTOCOL= "IMPS/2" X_USBMOUSE_DEVICE = "/dev/input/mice" X_USBMOUSE_BUTTONS = 3 X_USBMOUSE_RESOLUTION = 400 # Keyboards XkbSymboles = "us(pc101)" XkbModel = "pc101" XkbLayout = "us" USE_XFS = N LOCAL_APPS = N RUNLEVEL = 5 PATH=./:/usr/java/j2sdk1.4.1_01/bin/java:$PATH
In the final line of the config file, I added a current path (./) as well as the path for all the binary, such as JavaC and Java for every user.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
- SourceClear Open
- Parsing an RSS News Feed with a Bash Script
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide