
By Dapeng Zhu
Install Linux on your laptop and you have a powerful, yet
portable Unix system. Read on and learn the ins and out of
installing popular Linux distributions on Toshiba notebook
computers.
p>Questions and comments regarding the approach outlined in this
article should be dir
ected to the author at
dapengz@umich.edu
.
``Linux is a freely-distributable, independent UNIX-like
o
perating system for Intel x86, Motorola 68K, Digital Alpha,
SPARC, MIPS, and Motorola PowerPC processor machines. It is an
implementation of the POSIX specification with which all true
versions of UNIX comply. The Linux kernel uses no code from AT&T
or any other proprietary source, and much of the software
available for Linux is developed by the Free Software
Foundation's GNU project.''
(A link to the Linux information site,
www.linux.org
)
Then, how to pronounce Linux? Try it three times before
listening to the
english pronunciation of
Linux
(41K au-format audio file). Also, here is a photo of
Linus Torvalds
(<URL:http://skynet.ul.ie/aboutskynet/linus.html>), the
author of Linux, who made all this possible.
This t
utorial is not intended to be a substitute for the
installation instructions that come with your Linux distribution.
Rather, it documents some of the issues that confused me when I
first installed and used Linux. One thing that Linux is
different from other commercial UNIX is that it is used on a
variety of hardware. Unlike Sun Microsystems' Solaris for SPARC
or Hewlett Packard's HP/UX, which run on specific hardware.
Comparison of Different Distributions
Several of the most popular distributions of Linux
include Slackware, Red Hat, Debian, Caldera (based upon RedHat),
and WGS. Many experienced Linux users will tell you that a
distribution such as Red Hat or Caldera, which is based upon Red
Hat are the simplest to install and get running. These
distributions also include a certain amount of support from the
distributor, which makes them attractive for a corporate
environment.
One advantage (and disadvantage) of Redhat is the easy
installation. You don't ne
ed to be familiar with Linux, all you
have to do is to indicate what kind of functions you want your
computer to have. The installation program will ask you whether
you want your computer to be a Network Station, or a Web server,
or a Game Machine. But you lose the control of what will be
installed because it will not prompt you what packages to
install. For example, the Chinese font was installed on my
computer as a default. While nice for me, maybe it's not your
first choice. Another advantage of Redhat is that it has a
program similar to Windows Control Panel (it is called Control
Panel, too) that enables you to customize Linux under a graphical
user interface. Note that kernel source is not installed as a
default option. You have to install it yourself using
GLINT (Glint Graphical Package Manager).
Slackware is perhaps the most flexible. If you want to gain
more control over your installation, you should choose Slackware.
You can customize the installation options and decide which
package(
s) to install. And it installs from CD-ROM, over network
via NFS mounts, and from DOS partitions. One of the biggest
complaints about Slackware is that it seems to be ``simple for the
experienced user'', but a bit tough on newbies.
Debian and Red Hat have excellent version control systems
built in. Debian has a feel similar to FreeBSD, with a tight
version control system that allows for automatic version control
and updating via the Net if you like. Red Hat also has good
version and source controls in place in their RPM system.
If you are not a Linux guru or you don't have much time to
fool around, I don't suggest Debian Linux, as it might become a
nightmare. For one thing, you have to backup everything on your
hard disk before installing Debian because it will alter the
partition record and you will lose everything in your MS-DOS
partition (at least it did this to me). Also, to install Debian,
you have to prepare six pre-formatted floppy disks, compared to
two floppies with Redhat and S
lackware.
These diskettes install the base Linux root file
system, and then additional packages can be installed directly from
the Debian ftp server.
For a table comparing many of the popular distributions,
see
A Comparison of Linux Distributions
(<URL:http://www.ssc.com/lj/distable.html>)
For each distribution, there are different versions. Choose
the latest, if possible. They come with a newer version of the
kernel and software packages. Also note that even the same
version of the same distribution, may have different forms. Some
may come with more software than the others. For example,
Slackware 3.1 may fit on one CD-ROM, but you can buy two CD-ROM
sets.
If you are an experienced Linux user, or have an older version
of Linux, Tri-Linux from
Linux System Labs
(<URL:http://www.lsl.com>), may be a better choice. You
can get all three major distr
ibutions on one CD-ROM for $7.98
($2.98 for the CD-ROM, $5.00 for shipping/handling). Of course,
you get no manual, no warranty, nothing, just a plain CD-ROM.
Note if you feel uncomfortable reading document online, don't buy
Tri-Linux.
Where to Get Linux Distributions
All of the on-line distributions are available without charge
from their Internet archive sites. You can always get the latest
version from
Sunsite
(<URL:ftp://sunsite.unc.edu/pub/Linux/distributions/>). If
you have the time, investigate this site thoroughly as it is
quite useful for Linux users. You can find almost anything about
Linux here. Well, you will be able to download the ``candy''
shortly. But, if you just have a (slow) modem connection, don't
try to download everything. Even if your ISP allows unlimited
hookup, it just isn't worth the time. Another reason is that if
your hard disk crashed, you will lose everyth
ing. Better to buy
a CD-ROM, which you can keep as long as you want, and then
download upgrades from the Net when they become available.
Patches and updates are always available at
Sunsite
(<URL:http://www.sunsite.unc.edu/pub/Linux/!INDEX.html>).
There are other ways you can get these distributions. Lots of
books on the market come with Slackware or Redhat on an
accompanying CD-ROM. A good book would be
Linux installation
and Configuration
by Patrick Volkerding, who is also the
author of the Slackware distribution. This book is co-authored by
Kevin Reichard and Eric F. Johnson, published by MIS Press (ISBN
1558284265), and is available from
Amazon books
. This book comes with a two CD-ROMs set of
Slackware distribution, the other is a huge archive of
S
unsite
files.
Another book of note is
Redhat Linux Unleashed
,
written by Kamran Husain, Timothy Parker, and Tim Parker,
published by Sams (ISBN 0672309629), and is available from
Amazon books
. This book comes with a single CD-ROM of Redhat
Distribution.
Don't forget to check out your local library and bookstore.
However, don't use a version older than six months. Linux has
has several major features, security fixes, and enhancements
incorporated in the latest kernel releases, which you will not
get from the older distributions. There are several CERT
advisories out about older distributions that will make you want
to stay away from the older versions.
You can also order Linux distributions from these Web sites:
Using UMSDOS or Separate Linux Partition
Because most Toshiba Notebooks comes with Windows 95 or WFW
3.1 already installed, you need to decide whether to install
Linux on a separate disk part
ition, using a file system called
ext2 (Extended File System II), or to install it on a MS-DOS
(Windows 95) partition, using a file system called UMSDOS. Both
approaches have advantages and disadvantages. Here, partition
means a physical part of the hard disk that is separated from
other parts of the disk using the Partition Record.
If you choose UMSDOS, you don't have to repartition the hard
disk -- it is like installing a DOS application. However, you
will lose a lot of disk space, especially if you have a large
disk. For most Toshiba notebooks, you will have more than a
gigabyte of hard-disk space. If all your hard disk is in one
partition, the smallest file size will be 16 kilobytes or more.
This is because DOS' 16-bit FAT file system, which means DOS can
only have 64K possible clusters. Thus for a 1,024 megabyte
partition, the size of one cluster will be 16 kilobytes. That
means if you have a file with a size of only one kilobyte, it
will still consume 16 kilobytes of disk space. Linux has
many
such small files. If the manual said it will take 100 megabytes
of disk space, you had better prepare for about 50 per cent
more.
With a native Linux Partition, the size of the smallest file
can be selected to be one, two, or four kilobytes at partition
format time. The smaller the size, the more disk space you will
save, but you will lose some disk performance because the kernel
will need to examine more locations when looking for a file.
Someone said there will be some speed loss using UMSDOS. But
that hasn't been my experience. Sometimes it will be even faster
to use UMSDOS because of the 16-bit FAT used by DOS. If you plan
to use UMSDOS, you will not be able to use LILO (LInux LOader),
you can only use Loadlin (Load Linux) or a floppy boot disk to
load Linux. For more information about LILO and Loadlin, check
out
Booting
Multiple Operating Systems With LILO
(<URL:http://www.wwnet.com/~stevelim/booting
.html>)
With UMSDOS, there will be no interference between DOS and
Linux. Although you have to start DOS first, the Linux kernel
image will be loaded into memory and overwrite the DOS system.
In both circumstances, you will be able to access MS-DOS files
under Linux through mounting. But you will only be able to
access Linux files under DOS (Windows 95) using UMSDOS. So it
gives us a big advantage, UMSDOS is easy to uninstall. Just
delete the C:\Linux directory, and you are done. Well, it seems
UMSDOS a good choice. But wait a moment, it is not pure Linux!
Your Linux is residing on top of a DOS-y thing? No way. If you
installed Linux to protest against DOS, don't even try
UMSDOS.
If your hard disk was partitioned to use all its space for DOS,
you can save some space from DOS by using a utility called
Fips
(<URL:http://sunsite.unc.edu/pub/Linux/distributions/redhat/dos/fips11.zip>
),
which comes with most Linux distributions. Fips is freeware.
There is also another commercial program Partition Magic, which
functions same as Fips, if not better. It can be found at
PowerQuest's
PartitionMagic 3.0
(<URL:http://www.powerquest.com/products/partitionmagic/>).
Fips can cut your hard disk usage significantly, forming a new
partition with the unused portion. Fips seems perfectly safe to
use (I haven't heard of any damage as a result). But you still
better backup your hard disk first! And before processing, study
the README file that comes with Fips at least ten times. Fips
requires a continue portion of the unused space at the end of the
disk. You can use
defrag
to clean
up that part.
For Windows 95 users, there is one thing to note:
\windows\system.dat
is very important. After
Windows startup, this file be automatically set to hidden,
syst
em, and read-only. If this file happens to be in the portion
of the disk you want to excise,
defrag
will be
unable to move it. One way to solve this problem is to use a
defragmenter under DOS, but that may lose some long file names.
Another way is to use an approach like the following (You have to
do this under DOS, not Windows 95):
cd \windows
attrib system.dat -r -h -s
copy system.dat system.backup
ren system.dat system.junk
ren system.backup system.dat
These commands create a copy of the
system.dat
file, which may be in another part of the disk. Then we rename
the copy back to
system.dat
. Usually this procedure
will move the
system.dat
file to the other part of
the disk. If it doesn't, do it again.
How to Configure Hardware
Okay, you've got your distribution, and you're ready to
install Linux. Then how do you know what kind of
hardware you have? First thing to try is t
o examine the manual
that comes with your computer. If you have sold that manual to
the antique shop, then surf on over to the manufacture's Web
site. Usually there will be more than enough information. For
Toshiba Notebooks,
Toshiba's
Web site
(<URL:http://www.toshiba.com/tais/csd/products/index2.htm>)
is the ultimate resource. Also, here is a personal Web site that
provides
Toshiba
Satellite 410CS specifications
(<URL:http://www.eskimo.com/~ians/linux-t410cs.html#CS>).
Then what if manufacture doesn't provide enough information?
Or what if you have bought some other hardware? There's still
something you can do. Boot up Windows 95, OS/2, or whatever OS
you have. These operating systems usually can tell you what kind
of hardware you have, without much input from you. For example,
Windows 95 thinks Toshiba's pointing stic
k is a PS/2 mouse. Then
in Linux, you can use a PS/2 mouse driver for the pointing stick.
Also, you can check the IRQs or DMAs for your hardware.
Note that some of the settings may have been changed by the
user. So even you have plenty of information from the
manufacturer, it is still a good idea to check the current
configuration with Windows 95: click the Start button, open the
Control Panel under the Settings menu, double click System Icon,
choose Device Managers tag, and you will see a list of devices on
your computer. Click Property button for any device, and you
will see a list of properties. For example, if you are using a
PCMCIA modem, it is difficult to find out which COM port it is
connected to under Linux. Under Windows 95, you may find it is
connected to COM3, with the IRQ set at 11.
Sample DOS
CONFIG.SYS
and
AUTOEXEC.BAT
to use Loadlin
Loadlin is an alternative to LILO. It doesn't depend on Master
Boot Record (MBR), so if
your MBR is changed or damaged (reinstalling
Windows 95 will alter MBR, and LILO will be disabled), Loadlin
can still load Linux from DOS. Also, LILO doesn't have a menu,
and the waiting time is limited. DOS' multi-configuration give
you the power to display a menu before DOS (or Windows 95) starts,
you can set a default boot-up, and how long the system waits to
boot that OS. If you are not using UMSDOS, first boot into Linux,
then make the copy:
cp /vmlinuz /win95
which assumes you've mounted MS-DOS partition under /win95
You have to use a DOS version newer than 6.0 to employ
multi-configuration, which lets you create different
configurations for different situations. When DOS (Windows 95)
boots up, it will give you a menu, and you can select to go to
Windows, or just boot DOS, or start Linux. If you want to play
DOS games (like me) and thus need to boot into DOS 7.0, you'll
need to modify the
MSDOS.SYS
file by adding the
line:
BOOTGUI=0
The
CONFIG.SYS
file (Don't add lines that begin
with #, as they are comments):
switches=/f
[menu]
#Define a menu
menuitem=Linux, Starting Linux
menuitem=DOS, Starting DOS 7.0
menuitem=WIN95, Starting Windows 95
[DOS]
#Files to start when using DOS
device=C:\Windows\himem.sys /test:off
device=C:\Windows\emm386.exe Noems Ram Highscan I=B000-B7FF
dos=high,umb
fileshigh=40
[WIN95]
#Nothing to do with Windows 95
[Linux]
#Nothing to do with Linux at this time
The
AUTOEXEC.BAT
File:
@echo off
# config is a environmental variable that
# indicates which menu item was selected.
# It can be DOS, Linux, or WIN95
goto %config%
:Linux
# This is the line to load Linux.
# The kernel image vmlinuz can be anywhere,
# but a full path should be included.
#
root=/dev/hda2
indicates the partition Linux is in.
# For UMSDOS, it can be C:\Linux
#
r
is to mount root read-only when booting.
C:\tools\loadlin C:
\vmlinuz root=/dev/hda2 r
goto end
:DOS
# Start a Cache program
lh C:\Windows\smartdrv.exe
goto end
:WIN95
win
goto end
:end
Initialization Files
Several Linux files are equivalent to the DOS
CONFIG.SYS
and
AUTOEXEC.BAT
files.
Some of them have the same name as their counterpart in other
Unix systems, some don't. All of the Linux configuration files
are located in the
/etc
directory. The
/etc/rc.d/
subdirectory is the place to find script
files that are used for system boot or shutdown. For Redhat
distribution, you can use Control Panel to edit these start-up
files. Here's a description of the most important configuration
files:
/etc/fstab
This file is consulted when mounting, dumping, and checking
file systems. If after installing Linux, the system can't
recognize your CD-ROM, there may be something wrong with this
file. Here's a sample listing:
#de
vice mount file system options dump fsck
point type order
/dev/hda2 / ext2 defaults 1 1
/dev/hda3 none swap sw
/dev/hda1 /win95 vfat defaults 0 0
/dev/hdc /cdrom
/dev/fd0 /fd ext2 noauto 0 0
none /proc proc defaults
Note, If you are using a removable floppy disk, like many of
the Notebook users do, the option for mounting a floppy should be
set to noauto. Another note, vfat is the file system type that
most Windows 95 systems use. You can use long file names under
Linux. If there is space in a file name, for instance,
C:\Software Archive
, you have to type
/win95/Software\ Archive
to access this file under
Linux. Currently, there is no support for the FAT32 file system
under Linux. FAT32 is a new file system that comes with Windows
95 OEM SR2. I believe that s
oon there will be a module to support
FAT32. Check
Windows
95 OSR2 FAQ
(<URL:http://www.users.cts.com/king/s/serwin/osr2.html>)
for more details.
/etc/rc.d/system.init
or
/etc/rc.d/rc.sysinit
The name of this file varies depends on the distribution. As
the file name implies, it is used when the system is booting up.
Some important daemons are loaded at this time. The format of
the file is pretty self explanatory. You may modify it for your
own needs. For example, if your Sendmail daemon is not
configured correctly, you may disable it in this ``init'' file,
so that your machine won't hang for three minutes during boot
up.
/etc/rc.d/rc.pcmcia
and
/etc/rc.d/rc.cdrom
These configuration files for PCMCIA and CD-ROM devices often
get new Linux users in trouble. They have
different names in
different distributions. For some computers, the PCMCIA card
will conflict with the mouse under Linux. (It doesn't mean every
computer will have this conflict, even the same model.) To solve
the conflict, modify the
/etc/sysconfig/pcmcia
file
for Redhat, and
/etc/rc.d/rc.pcmcia
for Slackware.
Make sure the PCMCIA files have entries like these (lines
starting with # are comment, so you don't to type them):
# Enable PCMCIA
PCMCIA=yes
PCIC=i82365
# This line reserves the IRQ for mouse or other devices
OPTS=irq_mask=0xefff
/etc/rc.d/rc.local
This file is for loading local configurations. It is a good
practice to modify this file instead of
/etc/rc.d/rc.S
.
/etc/XF86Config
This configuration file might live in
/usr/lib/X11
instead of
/etc
, depending
on the distribution you use. For the
Slackware distribution, you
have to modify these files by hand or use a text-based program,
xf86config
. Make a backup so you can recover from
a mistake. For the Redhat distribution, you may use Control
Panel to modify the files with its self-explanatory GUI. We
present a sample file later in this tutorial.
$HOME/.xinitrc
This is the X Window System start-up file. In Linux, we use
startx
or
xdm
to start X, instead of
the
xinit
utility or starting the X server directly
as in other Unix systems. Use this file to specify clients you
want to be run when the X Window System starts up. Typically,
you may set the
DISPLAY
environment variable, load
your resources file, start a window manager, invoke clients you
want on your display, like terminal emulators, a clock, system
load graph, or calculator. Here's a small sample:
#!/bin/sh
xrdb -load $HOME/.Xdefaults
xterm -fn 7x13b
old -name "LoginTerm" -geometry 110x44+0+0 &
xsetroot -solid lightblue
exec fvwm
Here,
xrdb
loads the X resources. X resources
decide the default look of the X Windows system, such as default
type size, font, color of the windows. The resources can either
be in the
.Xdefaults
or
.Xresources
file. The
xterm
command line starts a X Terminal
with the name LoginTerm and the size specified. Here,
xsetroot
is used to set the background color. Note
that you have to employ either ``exec fvwm'' or ``exec fvwm2'' or
other Windows Manager in the foreground, not the background. It
is like you need Program Manager in Windows 3.1 and Explorer in
Windows 95.
$HOME/.fvwmrc
Edit this file to customize the window manager. This file is
quite long and the order of entries in the file is important.
You could employ this file to annoy someone who shares an account
with you -- for insta
nce, exchange the function of the minimize
and maximize buttons. :-)
Configuring XFree86
Most Linux distributions include
XFree86
(<URL:http://www.xfree86.org>), the x86 version of the X
Window System.
The folks who originally wrote X obviously never intended it
to be used by mere mortals. The installation directory structure
is extremely convoluted and disorganized and overcomplicated, as
is the installation and configuration process. However, do not
let that stop you from using X.
You can configure X by using the
xf86config
or
Xconfigurator
programs, which generate a file named
/etc/XF86Config
. There is a graphical configuration
program called XF86Setup, but you need to run X in order to use
it, a ``catch-22''.
For most Toshiba notebooks, and other notebook computers, the
pointing stick is using the PS/2 protocol. It doesn't take any
serial port, such as
COM
n
(DOS) or
cua
xx
(Linux), instead it uses
psaux
(Personal System Auxiliary Port). If your
GPM (General Purpose Mouse) is working, check the parameter
passed to it, which will usually give you an idea what kind of
mouse you have. For example, if in
/etc/rc.d/rc.S
the command to start GPM is:
gpm -t PS/2
Then the mouse type is PS/2. By the way, you can use GPM to
cut and paste under Linux as in most other Unix. Just hold down
left mouse button to select text, hold two mouse buttons together
to paste. Click two buttons together to simulate the center
button of a three-button mouse. More information on GPM can be
found from the manual page:
man gpm
Note that different computers uses different
XF86Config
files, where an incorrect configuration
could damage your hardware. Don't panic now. Usually your
monitor will not get burnt. Sometimes
it will give out zzzzzz...
sound. However, if you happen to use the same computer as mine
(Toshiba Satellite Pro 410CDT), you may try the file depicted
below. Otherwise, there is a sample file:
/usr/X11R6/lib/X11/XF86Config.eg
Sample
/etc/XF86Config
file:
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "Keyboard"
Protocol "Standard"
AutoRepeat 500 5
LeftAlt Meta
RightAlt Meta
ScrollLock Compose
RightCtl Control
XkbKeycodes "xfree86"
XkbTypes "default"
XkbCompat "default"
XkbSymbols "us(pc101)"
XkbGeometry "pc"
XkbRules "xfree86"
XkbModel "pc102"
XkbLayout "us"
EndSection
Section "Pointer"
Protocol "PS/2"
Device "/dev/psaux"
Emulate3Buttons
Emulate3Timeout 50
EndSection
Section "Monitor"
Identifier "Laptop LCD"
VendorName "Tos
hiba"
ModelName "TFT"
HorizSync 25 - 64
VertRefresh 40-70
Modeline "640x480" 28.33 640 664 760 800 480 491 493 525
ModeLine "800x600" 28.33 800 824 896 1024 600 601 603 625
EndSection
Section "Device"
Identifier "Chips & Technologies CT65545"
VendorName "Chips & Tech"
BoardName "CT65545"
VideoRam 1024
Clocks 28.33
EndSection
Section "Screen"
Driver "svga"
Device "Chips & Technologies CT65545"
Monitor "Laptop LCD"
Subsection "Display"
Depth 8
Modes "800x600"
ViewPort 0 0
Virtual 800 600
EndSubsection
EndSection
Configure Dialup Using EzPPP
Well, if you are not lucky enough to have a dedicated
connection to the Internet, one of your options is to use PPP
(Point-to-Point Protocol) to connect you to the Net. There are
several
HOW-TOs
(<URL:http://sunsite.unc.edu/pub/Linux/docs/HOWTO/>) on how
to configure PPP.
I suggest you use a software package called
EzPPP
to establish
your PPP connection. The most recent version is
always available from the
EzPPP Project Web
Page
(<URL:http://www.serv.net/~cameron/ezppp/>). Make
sure you've enabled PPP in the kernel. If you don't, EzPPP will
still run, but after the connection is established, the
pppd
daemon will die. It's quite easy to set up a
dialup connection with this package. However, in my experience,
EzPPP
sometimes causes a ``core dump'' in Redhat
distribution. If you prefer a hard-coded PPP script, check out
pppscript
(<URL:ftp://ftp.ghgcorp.com/pub/home/crholmstrom/download/pppscript.tar.gz>).
Be aware that some distributions include
pppd
2.2.0, which is somewhat out of date so you'll want to get a more recent
version, either commercial or freeware. One freeware version is
available by FTP from
ftp://cs.anu.edu.au/pub/software/ppp
, This version fixes some LCP
problems encountered with version 2.20.
If your ISP doesn't support PPP, maybe you can try SLIP. Here
is
Configuring SLIP
(<URL:http://www.utcc.utk.edu/CAS/misc_docs/linuxEDS/intro.html#SLIP>).
Set up Dynamic Web Server
If you are using Redhat Linux, your Web server has already
been installed when you first start Linux. The configuration
files are
/etc/httpd/conf/httpd.conf
,
/etc/httpd/conf/access.conf
, and
/etc/httpd/conf/srm.conf
. Slackware installs Apache
1.1.1 to
/usr/sbin/httpd
, and all of the HTML docs
are in
/var/lib/httpd/htdocs.
Usually there is
nothing you need to change. Just point your browser to the
URL:
http://127.0.0.1/
and you will see your home page, which has path
name
/home/httpd/html/index.html
.or on Slackware
/var/lib/httpd/htdocs
Also, you can create your own CGI scripts and locate them in
the
/home/httpd/cgi-bin/
directory. You can call
the script with a URL like:
http://127.0.0.1/cgi-bin/script-name.cgi
File
/etc/httpd/conf/srm.conf
contains some
important configuration parameters. Note the configuration
depends on the Linux distribution you use. Please check the document,
or check
Apache User's Guide
(<URL:http://www.apache.org/docs/>). Here are a few examples for
Redhat Linux:
DocumentRoot
- Defines the document root directory, where the HTML and
related files are located. If
http://127.0.0.1/
points to
/home/httpd/html/
, you could change it to
/html
by changing this directive as in:
DocumentRoot /html
ScriptAlias
- Defines where to find CGI programs, generally the
/cgi-bin/
directory. You can could it to
/html/cgi-bin/
by defining:
ScriptAlias /cgi-bin/ /html/cgi-bin/
AddHandler
- Allows the server to treat certain files as executable. For
instance, to let the server treat files whose names have with
extensions
.pl
(for Perl) and
.sh
(for
Bourne shell scripts) as CGI scripts, add this directive:
AddHandler cgi-script .pl .sh
The format of the Web server's configuration files are
explained by extensive comments. You can always connect to
the Apache project
Web site
(<URL:http://www.apache.org>) for help.
When you get on the Internet, usually you will be assigned an
IP address by your Internet service provider. This allows others
to visit your Web pages, too. For example, when I use
s a dialup
to MichNet, I got a domain name like
pm127.12.mich.net
, whose IP address may be, say,
111.111.111.111
, then my friends will be able to
connect with either URL:
http://pm127.12.mich.net
,
or
http://111.111.111.111/
, it's that easy. Note if
your ISP allocates IP address dynamically, your domain name or IP
address usually will vary each time you dial in.
You could put up a permanent home page with a link to your
dynamic Web server. It should also include whether you are
online, and if so, what your current IP address is, and so forth.
You have to write some scripts to update the information on this
page each time you connect to the Net. Then others will be able
to visit your very own Web server.
Some Security Concerns
There may be some security issues. Hackers can break into
your computer. Add the following line to the
/etc/hosts.deny
file:
ALL:ALL
to d
eny all connections to your machine. Then, to allow your
self access, add this line to
/etc/hosts.allow:
ALL:LOCAL
There are some viruses targeting Linux. Unlike most other
Unix systems, which have a strict user-privilege restriction,
Linux users are usually
root
, or at least have some
superuser privilege. Because most Unix viruses affect files for which
current users have write permission, Linux users are vulnerable
to virus attack. However, unlike most DOS virus, a Linux virus
is usually made for fun and for learning. The author and source
code are usually available, some viruses even has alpha and beta
versions. But if your task is critical, you should try
VirusScan for Linux
(<URL:ftp://ftp.mcafee.com/pub/antivirus/unix/linux/>).
There are several ways to minimize exposure to viruses. One is
to only use superuser accounts for maintenance. The other i
s to
delete any user that is affected.
Using Floppies Under Linux
Because I use a removable floppy drive, I compile the Normal
Floppy Support as a module in the kernel. If you are using
kerneld
, you don't need to worry about loading
modules. Otherwise, you could use the following for the Redhat
Distribution. (If you are using Slackware or others, please
check your manual).
insmod floppy
And do the following:
mkdir /fd
(if it doesn't exist)
mount /dev/fd0 /fd -t vfat
(or ext2 for Linux)
and you can use your floppy as a normal directory. Remember to
unmount the floppy before changing the disk. Use:
umount /dev/fd0
Installing JDK (Java Development Kit)
The variety of programming tools is one of the reasons that I
use Linux. Almost all programming languages have been ported to
Linux, including C (of course), C++, Objective C, FORTRAN,
Pascal, Perl, TCL, and others. And, Sunsoft's Java Development
Kit has been ported as well. You can download the latest Linux
version of JDK at
Java-Linux
(<URL:http://substance.blackdown.org/java-linux.html>).
Furthermore, all three major Linux distributions now come with
the JDK. It is usually in the
/contrib
directory of
the CD-ROM. For instance, in Redhat, you can use
glint
to install JDK. It's under the
/Libraries
directory. Emacs now has a Java support
module, too.
Additional Resources
|