Index ..................................................................................................................................................27
v
Chapter 1. What is TUX?
TUX is a kernel-based web server licensed under the GNU General Public License (GPL).
It is currently limited to serving static web pages and coordinating with kernel-space modules, user-space modules, and regular user-space web server daemons to provide dynamic
content. Regular user-space web servers do not need to be altered in any way for TUX to
coordinate with them. However, user-space code has to use a new interface based on the
tux(2) system call.
Although dynamic content is becoming increasingly popular, there is still a need to serve
static content. For example, nearly all images are static. TUX can serve static content very
efficiently from within the Linux kernel. A similar operation is already performed by the
Network File System (NFS) daemon that runs in the kernel.
TUX also has the ability to cache dynamic content. TUX modules (which can be build in
kernel space or in user space; user space is recommended) can create "objects" which are
stored using the page cache. To respond to a request for dynamic data, a TUX module can
send a mix of dynamically-generateddata andcached pre-generated objects,taking maximal
advantage of TUX’s zero-copy architecture.
This new architecture for serving dynamic content requires a new API. The current API’s
for CGI can not be sufficiently mapped to TUX’s API. Thus, existing CGI applications must
be converted before TUX will process them. If the CGI application does not require the increased speed of TUX, TUX can process it by running the CGI application normally. This
is done through TUX’s CGI module. TUX can also handle a complex request (CGI or otherwise) by redirecting it to another web server daemon such as Apache. In other words,
static content, TUX modules, old-style CGI applications, and programs specifically written
for other webservers can be run on the same system with TUX as the main web server.
In summary, the differences between TUX and other webservers as well as the benefits of
using TUX include:
• TUX runs partly within a custom version of kernel 2.4.x or higher and partly as a user-
space daemon.
• With a capable network card, TUX enables direct scatter-gatherDMA from the page cache
directly to the network, thus avoiding data copies.
• Whenever TUX is unsure how to process a request or receives a request it is unable to
handle, it always redirects the request to the user-space web server daemon to handle it in
an RFC-compliant manner. An example of this user-space web server daemon is Apache.
Apache isused throughout this document as the user-space webserver daemon for readability.
For questions or comments about TUX or this documentation, join the
<tux-list@redhat.com> mailing list. For instructions on joining the mailing list, see
http://www.redhat.com/mailing-lists/.
• Zero-copy parsing — Where possible, TUX parses input packets directly. Even in RAM-
limited situations, TUX now does full, back-to-back zero-copy I/O.
Other changes include
• Enhanced user-space utilities and module support.
• Mass virtual hosting support — The host-based virtual server patch has been added to
TUX. Thereis no limit on thenumber of virtual hosts supported, only RAMand diskspace.
• CGIs can be bound to particular CPUs or can be left unbound.
• A number of bugs were fixed which caused performance problems — TUX 2.1 is now
significantly faster than TUX 1.0!
1.2. Summary of System Requirements
• TUX Customized 2.4.x-based version of the kernel or higher
• x86, Alpha, IA64 or PowerPC/64 platform (should work on PowerPC/32, untested on
Sparc)
• Alternate web server such as Apache running on the same server to process unknown
requests
1.2.1. Current Limitations
• TUX can only call the other Web server such as Apache on the same server. In future
revisions, it will allow the rollover of unsupported content to an alternate server.
Chapter 2. Installation
This chapter describes how to install TUX.
2.1. Installation Instructions
1. For optimal performance, create a separate RAID partition as the document root for
TUX.
2. Configure and install the kernel with TUX support built-in, if it has not already been
provided with TUX configured.
3. Install the TUX package with the command rpm -Uvh tux-2.1.0-2.i386.rpm (modify as necessary for new versions...)
4. Create an index.html file in /var/www/html, the default document root directory.
5. Start TUX with the command service tux start (or ./tux.init start on Linux
systems not running Red Hat Linux), and test the URL http://localhost/ with lynx
or any Web browser.
The latest TUX releases can be downloaded from http://people.redhat.com/~mingo/TUXpatches/. To install a TUX patch use the following instructions:
2. Apply the TUX patch to a vanilla 2.4.2 kernel tree with the command patch -p0 <
tux2-full-2.4.2-X6 (where tux2-full-2.4.2-X6 is the TUX kernel patch).
3. Use make oldconfig to enable TUX in the kernel config, compile it, and boot into the
TUX kernel.
4. Compile and install the userspace utilities, where tux-2.0.25 is the version of TUX
you want to install:
tar xzvf tux-2.0.25.tar.gz
cd tux-2.0.25
make
make install
5. Create an index.html file in /var/www/html, the default document root directory.
6. Start TUX with the command service tux start (or ./tux.init start on Linux
systems not running Red Hat Linux), and test the URL http://localhost/ with lynx
or any Web browser.
2.1.1. Log Files
For each request, TUX logs the address of the requestor, a date and time stamp accurate to at
least one second, specification of the file requested, size of the file transferred, and the final
status of the request.
The log files for TUX are stored in /var/log/tux in binary format. In this binary format, the
log files are approximately 50% smaller than standard ASCII text log files. To view log files
use the command /usr/sbin/tux2w3c /var/log/tux. The tux2w3c program converts the
9
Loading...
+ 19 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.