Документ взят из кэша поисковой машины. Адрес оригинального документа : http://rtm-cs.sinp.msu.ru/manual/howto/WWW-HOWTO.html
Дата изменения: Thu May 4 20:03:19 2000
Дата индексирования: Mon Oct 1 20:47:15 2012
Кодировка:
Linux WWW HOWTO

Linux WWW HOWTO

by Mr. Poet, poet@linuxports.com

v0.85, 21 August 1999


This document contains information about setting up WWW services under Linux (both server and client). It tries not to be a in detail manual but an overview and a good pointer to further information.

1. Introduction

2. Setting up WWW client software (Antiquated)

3. Lynx

4. Emacs-W3

5. Netscape Navigator/Communicator

6. Setting up WWW server systems

7. Apache

8. Web Server Add-ons

9. Intranet Section

10. Install the HTTP server

11. Testing HTTPd

12. Connecting to the Linux Server

13. Setting up the Intranet

14. Accessing the Web

15. More things to do

16. Credits and Legalities

17. For further reading


1. Introduction

Many people are trying Linux because they are looking for a really good Internet capable operating system. Also, there are institutes, universities, non-profits, and small businesses which want to set up Internet sites on a small budget. This is where the WWW-HOWTO comes in. This document explains how to set up clients and servers for the largest part of the Internet - The World Wide Web.

All prices in this document are stated in US dollars. This document assumes you are running Linux on an Intel platform. Instructions and product availability my vary from platform to platform. There are many links for downloading software in this document. Whenever possible use a mirror site for faster downloading and to keep the load down on the main server.

1.1 Copyright

This document is Copyright (c) 1999 by Mr. Poet

This document is Copyright (c) 1997 by Wayne Leister. The original author of this document was Peter Dreuw.(All versions prior to 0.8)

This HOWTO is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You can obtain a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Trademarks are owned by there respective owners.

1.2 Feedback

Any feedback is welcome. I do not claim to be an expert. Some of this information was taken from badly written web sites; there are bound to be errors and omissions. But make sure you have the latest version before you send corrections; It may be fixed in the next version (see the next section for where to get the latest version). Send feedback to poet@linuxports.com.

1.3 New versions of this Document

New versions of this document are always available at the LinuxPorts Website.


2. Setting up WWW client software (Antiquated)

Please note that the following section is very outdated and was last updated in 1997. This section is being kept here for historical purposes only. All major distributions of Linux come with Netscape and Lynx. These are the two most popular browsers for the Linux Operating System. If you do not have these browsers installed currently please go to their respective sections for download information.

The following chapter is dedicated to the setting up web browsers. Please feel free to contact me, if your favorite web browser is not mentioned here. In this version of the document only a few of the browsers have there own section, but I tried to include all of them (all I could find) in the overview section. In the future those browsers that deserve there own section will have it.

The overview section is designed to help you decide which browser to use, and give you basic information on each browser. The detail section is designed to help you install, configure, and maintain the browser.

However I use Lynx when I don't feel like firing up the X-windows/Netscape monster.

2.1 Overview

Navigator/Communicator

Netscape Navigator is the only Linux browser mentioned here, which is capable of advanced HTML features. Some of these features are frames, Java, Javascript, automatic update, and layers. It also has news and mail capability. But it is a resource hog; it takes up lots of CPU time and memory. It also sets up a separate cache for each user wasting disk space.

Netscape is currently an OpenSource product and can be downloaded from ftp.netscape.com=>. <tag><ref id= name="Lynx"> Lynx is the one of the smallest web browsers. It is the king of text based browsers. It's free and the source code is available under the GNU public license. It's text based, but it has many special features. Lynx now supports tables, color (via curses) and frames.

Note on frame support for lynx:

The frame support for lynx is limited, it will notice the frames and show the title of the frames for your to select as hot links. Since, frame titles are usually very undescriptive for coding simplicity this can be confusing.

Kfm

Kfm is part of the K Desktop Environment (KDE). KDE is a system that runs on top of X-windows. It gives you many features like drag an drop, sounds, a trashcan and a unified look and feel. Kfm is the K File Manager, but it is also a web browser. It is very usable as a web browser and it supports frames, tables, ftp downloads, looking into tar files, and more. The current release of KDE is 1.1.1 with 1.1.2 very near by. Kfm can be used without KDE, but you still need the librarys that come with KDE. For more information about KDE and Kfm visit the KDE website at http://www.kde.org.

Emacs

Emacs is the one program that does everything. It is a word processor, news reader, mail reader, and web browser. It has a steep learning curve at first, because you have to learn what all the keys do. The X-windows version is easier to use, because most of the functions are on menus. Another drawback is that it's mostly text based. (It can display graphics if you are running it under X-windows). It is also free, and the source code is available under the GNU public license.

NCSA Mosaic

Mosaic is an X-windows browser developed by the National Center for Supercomputing Applications (NCSA) at the University of Illinois. NCSA spent four years on the project and has now moved on to other things. Again, Mosaic is no longer supported. However since the source is free for non-commercial use it might make an interesting project for someone who wants to develop a new browser.

Amaya

Amaya is the X-windows concept browser for the W3C for HTML 3.2. Therefore it supports all the HTML 3.2 standards. It also supports some of the features of HTML 4.0. It supports tables, forms, client side image maps, put publishing, gifs, jpegs, and png graphics. It is both a browser and authoring tool. The latest public release is 1.0 beta. Version 1.1 beta is in internal testing and is due out soon. For more information visit the Amaya web site at http://www.w3.org/Amaya/. It can be downloaded from ftp://ftp.w3.org/pub/Amaya-LINUX-ELF-1.0b.tar.gz.

Qweb

Qweb is yet another basic X-windows browser. It supports tables, forms, and server site image maps. The latest version is 1.3. For more information visit the Qweb website at http://sunsite.auc.dk/qweb/ The source is available from http://sunsite.auc.dk/qweb/qweb-1.3.tar.gz The binaries are available in a Red Hat RPM from http://sunsite.auc.dk/qweb/qweb-1.3-1.i386.rpm

It is the reccomendation of this author that users of web browsers use either Netscape 4.x, Lynx or Netscape 5.xAlpha. They are the only one currently available for Linux that support most features. Personally I suggest Netscape5.xAlpha, even though it is Alpha Software it is quite stable and frankly implements the standards better than the 4.x versions do.


3. Lynx

Lynx is one of the smaller (around 600 K executable) and faster web browsers available. It does not eat up much bandwidth nor system resources as it only deals with text displays. It can display on any console, terminal or xterm. You will not need an X Windows system or additional system memory to run this little browser.

3.1 Where to get

Most distributions have Lynx in them. Therefore I will not bore you with the details of compiling and installing Lynx.

The latest version is 2.8.2 and can be retrieved from http://www.slcc.edu/lynx/fote/ or from almost any friendly Linux FTP server like ftp://sunsite.unc.edu under /pub/Linux/apps/www/broswers/ or mirror site.

For more information on Lynx try these locations:

Lynx Links

http://www.crl.com/~subir/lynx.html

Lynx Pages

http://lynx.browser.org

Lynx Help Pages

http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html (the same pages you get from lynx --help and typing ? in lynx)

Note: The Lynx help pages have recently moved. If you have an older version of Lynx, you will need to change your lynx.cfg (in /usr/lib) to point to the new address(above).

I think the most special feature of Lynx against all other web browsers is the capability for batch mode retrieval. One can write a shell script which retrieves a document, file or anything like that via http, FTP, gopher, WAIS, NNTP or file:// - url's and save it to disk. Furthermore, one can fill in data into HTML forms in batch mode by simply redirecting the standard input and using the -post_data option.

For more special features of Lynx just look at the help files and the man pages. If you use a special feature of Lynx that you would like to see added to this document, let me know.


4. Emacs-W3

There are several different flavors of Emacs. The two most popular are GNU Emacs and XEmacs. GNU Emacs is put out by the Free Software Foundation, and is the original Emacs. It is mainly geared toward text based terminals, but it does run in X-Windows. XEmacs (formerly Lucid Emacs) is a version that only runs on X-Windows. It has many special features that are X-Windows related (better menus etc).

4.1 Where to get

Most distributions include GNU Emacs.

The most recent GNU emacs is 19.34. It doesn't seem to have a web site. The FTP site is at ftp://ftp.gnu.ai.mit.edu/pub/gnu/.

The latest version of XEmacs is 20.2. The XEmacs FTP site is at ftp://ftp.xemacs.org/pub/xemacs. For more information about XEmacs goto see its web page at http://www.xemacs.org.

Both are available from the Linux archives at ftp://sunsite.unc.edu under /pub/Linux/apps/editors/emacs/

If you got GNU Emacs or XEmacs installed, you probably got the W3 browser running to.

The Emacs W3 mode is a nearly fully featured web browser system written in the Emacs Lisp system. It mostly deals with text, but can display graphics, too - at least - if you run the emacs under the X Window system.

To get XEmacs in to W3 mode, goto the apps menu and select browse the web.

I don't use Emacs, so if someone will explain how to get it into the W3 mode I'll add it to this document. Most of this information was from the original author. If any information is incorrect, please let me know. Also let me know if you think anything else should be added about Emacs.


5. Netscape Navigator/Communicator

5.1 Different versions and options.

Netscape Navigator is the King of WWW browsers. Netscape Navigator can do almost everything. But on the other hand, it is one of the most memory hungry and resource eating program I've ever seen.

There are 3 different versions of the program:

Netscape Navigator includes the web browser, netcaster (push client) and a basic mail program.

Netscape Communicator includes the web browser, a web editor, an advanced mail program, a news reader, netcaster (push client), and a group conference utility.

Netscape Communicator Pro includes everything Communicator has plus a group calendar, IBM terminal emulation, and remote administration features (administrators can update thousands of copies of Netscape from their desk).

In addition to the three versions there are two other options you must pick.

The first is full install or base install. The full install includes everything. The base install includes enough to get you started. You can download the additional components as you need them (such as multimedia support and netcaster). These components can be installed by the Netscape smart update utility (after installing goto help->software updates). At this time the full install is not available for Linux.

The second option is import or export. If you are from the US are Canada you have the option of selecting the import version. This gives you the stronger 128 bit encryption for secure transactions (SSL). The export version only has 40 bit encryption, and is the only version allowed outside the US and Canada.

The latest version of the Netscape Navigator/Communicator/Communicator Pro is 4.6.1. There are two different versions for Linux. One is for the old 1.2 series kernels and one for the new 2.x kernels. If you don't have at least a 2.0 kernel I suggest you upgrade; there are many improvements in the new kernel.

Beta versions are also available. If you try a beta version, they usually expire in a month or so!

You can also try the 5.0 alpha at the Mozilla project located at www.mozilla.org. I suggest this highly, the new Netscape 5 is the best browser I have seen in a long time. It is extremely flexible and mostly stable even for an Alpha release.

5.2 Where to get

The best way to get Netscape software is to go through their web site at http://www.netscape.com/download/. They have menu's to guide you through the selection. When it ask for the Linux version, it is referring to the kernel (most people should be using 2.0 by now). If your not sure which version kernel you have run 'cat /proc/version'. Going through the web site is the only way to get the import versions.

If you want an export version you can download them directly from the Netscape FTP servers. The FTP servers are also more up to date. For example when I first wrote this the web interface did not have the non-beta 4.03 for Linux yet, but it was on the FTP site. Here are the links to the export Linux 2.0 and 2.2 versions:

Netscape Navigator 4.6.1 is at ftp://ftp.netscape.com/pub/communicator/4.6/shipping/english/unix/linux20/navigator_standalone/navigator-v403-export.x86-unknown-linux2.0.tar.gz

Netscape Communicator 4.6.1 for Linux 2.0 (kernel) is at ftp://ftp.netscape.com/pub/communicator/4.6/shipping/english/unix/linux20/base_install/communicator-v403-export.x86-unknown-linux2.0.tar.gz

These url's will change as new versions come out. If these links break you can find them by fishing around at the FTP site ftp://ftp.netscape.com/pub/communicator/.

These servers are heavily loaded at times. Its best to wait for off peak hours or select a mirror site. Be prepared to wait, these archives are large. Navigator is almost 8megs, and Communicator base install is 10megs.

5.3 Installing

This section explains how to install version 4 of Netscape Navigator, Communicator, and Communicator Pro.

First unpack the archive to a temporary directory. Then run the ns-install script (type ./ns-install). Then make a symbolic link from the /usr/local/netscape/netscape binary to /usr/local/bin/netscape (type ln -s /usr/local/netscape/netscape /usr/local/bin/netscape). Finally set the system wide environment variable $MOZILLA_HOME to /usr/local/netscape so Netscape can find its files. If you are using bash for your shell edit your /etc/profile and add the lines:

MOZILLA_HOME="/usr/local/netscape"
export MOZILLA_HOME

After you have it installed the software can automatically update itself with smart update. Just run Netscape as root and goto help->software updates. If you only got the base install, you can also install the Netscape components from there.

Note: This will not remove any old versions of Netscape, you must manually remove them by deleting the Netscape binary and Java class file (for version 3).


6. Setting up WWW server systems

This section contains information on different http server software packages and additional server side tools like script languages for CGI programs etc. There are several dozen web servers, I only covered those that are fully functional. As some of these are commercial products, I have no way of trying them. Most of the information in the overview section was pieced together from various web sites. If there is any incorrect or missing information please let me know.

For a technical description on the http mechanism, take a look at the RFC documents mentioned in the chapter "For further reading" of this HOWTO.

I prefer to use the Apache server. It has almost all the features you would ever need and its free! I will admit that this section is heavily biased toward Apache. I decided to concentrate my efforts on the Apache section rather than spread it out over all the web servers. I may cover other web servers in the future.

6.1 Overview

Cern httpd

This was the first web server. It was developed by the European Laboratory for Particle Physics (CERN). CERN httpd is no longer supported. The CERN httpd server is reported to have some ugly bugs, to be quite slow and resource hungry. The latest version is 3.0. For more information visit the CERN httpd home page at http://www.w3.org/Daemon/Status.html. It is available for download at ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/httpd-3.0.term.tpz (no it is not a typo, the extension is actually .tpz on the site; probably should be .tgz)

NCSA HTTPd

The NCSA HTTPd server is the father to Apache (The development split into two different servers). Therefore the setup files are very similar. NCSA HTTPd is free and the source code is available. This server not covered in this document, although reading the Apache section may give you some help. The NCSA server was once popular, but most people are replacing it with Apache. Apache is a drop in replacement for the NCSA server(same configuration files), and it fixes several shortcomings of the NCSA server. NCSA HTTPd accounts for 4.9% (and falling) of all web servers. (source September 1997 Netcraft survey). The latest version is 1.5.2a. For more information see the NCSA website at http://hoohoo.ncsa.uiuc.edu.

Apache

Apache is the king of all web servers. Apache and its source code is free. Apache is modular, therefore it is easy to add features. Apache is very flexible and has many, many features. Apache and its derivatives makes up 55% of all web domains. There are over 3,928,112 Apache servers in operation (source August 1999 Netcraft survey).

The official Apache is missing SSL, but there are two derivatives that fill the gap. Stronghold is a commercial product that is based on Apache. It retails for $995; an economy version is available for $495 (based on an old version of Apache). Stronghold is the number two secure server behind Netscape (source C2 net and Netcraft survey). For more information visit the Stronghold website at http://www.c2.net/products/stronghold/. It was developed outside the US, so it is available with 128 bit SSL everywhere.

Apache-SSL is a free implementation of SSL, but it is not for commercial use in the US (RSA has US patents on SSL technology). It can be used for non-commercial use in the US if you link with the free RSAREF library. For more information see the website at http://www.algroup.co.uk/Apache-SSL/.

Netscape Fast Track Server

Fast Track was developed by Netscape, but the Linux version is put out by Caldera. The Caldera site lists it as Fast Track for OpenLinux. I'm not sure if it only runs on Caldera OpenLinux or if any Linux distribution will do (E-mail me if you have the answer). Netscape servers account for 6.11% (and RISING!) of all web servers (source August 1999 http://www.netcraft.com/survey/). The server sells for $295. It is also included with the Caldera OpenLinux Standard distribution which sells for $399 ($199.50 educational). The web pages tell of a nice administration interface and a quick 10 minute setup. The server has support for 40-bit SSL. To get the full 128-bit SSL you need Netscape Enterprise Server. Unfortunately that is not available for Linux :( The latest version available for Linux is 2.0 (Version 3 is in beta, but its not available for Linux yet). To buy a copy goto the Caldera web site at http://www.caldera.com/products/netscape/netscape.html For more information goto the Fast Track page at http://www.netscape.com/comprod/server_central/product/fast_track/

WN

WN has many features that make it attractive. First it is smaller than the CERN, NCSA HTTPd, an Apache servers. It also has many built-in features that would require CGI's. For example site searches, enhanced server side includes. It can also decompress/compress files on the fly with its filter feature. It also has the ability to retrieve only part of a file with its ranges feature. It is released under the GNU public license. The current version is 2.08. For more information see the WN website at http://hopf.math.nwu.edu/.

AOLserver

AOLserver is made by America Online. I'll admit that I was surprised by the features of a web server coming from AOL. In addition to the standard features it supports database connectivity. Pages can query a database by Structured Query Language (SQL) commands. The database is access through Open Database Connectivity (ODBC). It also has built-in search engine and TCL scripting. If that is not enough you can add your own modules through the c Application Programming Interface (API). I almost forgot to mention support for 40 bit SSL. And you get all this for free! For more information visit the AOLserver site at http://www.aolserver.com/server/

CL-HTTP

CL-HTTP stands for Common Lisp Hypermedia Server. If you are a Lisp programmer this server is for you. You can write your CGI scripts in Lisp. It has a web based setup function. It also supports all the standard server features. CL-HTTP is free and the source code is available. For more information visit the CL-HTTP website at http://www.ai.mit.edu/projects/iiip/doc/cl-http/home-page.html

If you have a commercial purpose (company web site, or ISP), I would strongly recommend that you use Apache. I've also heard that the Netscape Server is easy to setup. If you have an internal use you can be a bit more flexible. But unless one of them has a feature that you just have to use,

This is only a partial listing of all the servers available. For a more complete list visit Netcraft at http://www.netcraft.com/survey/servers.html or Web Compare at http://webcompare.internet.com.


7. Apache

The current version of Apache is 1.3.9. The main Apache site is at http://www.apache.org/. Another good source of information is Apacheweek at http://www.apacheweek.com/. The Apache documentation is ok, so I'm not going to go into detail in setting up apache. The documentation is on the website and is included with the source (in HTML format). There are also text files included with the source, but the HTML version is better. The documentation should get a whole lot better once the Apache Documentation Project gets under way. Right now most of the documents are written by the developers. Not to discredit the developers, but they are a little hard to understand if you don't know the terminology.

7.1 Where to get

Apache is included in the Red Hat, Slackware, and OpenLinux distributions. Although they may not be the latest version, they are very reliable binaries. The bad news is you will have to live with their directory choices (which are totally different from each other and the Apache defaults).

The source is available from the Apache web site at http://www.apache.org/dist/ Binaries are are also available at apache at the same place. You can also get binaries from sunsite at ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/. And for those of us running Red Hat the latest binary RPM file can usually be found in the contrib directory at ftp://ftp.redhat.com/pub/contrib/i386/

If your server is going to be used for commercial purposes, it is highly recommended that you get the source from the Apache website and compile it yourself. The other option is to use a binary that comes with a major distribution. For example Slackware, Red Hat, or OpenLinux distributions. The main reason for this is security. An unknown binary could have a back door for hackers, or an unstable patch that could crash your system. This also gives you more contr