Knowledge Is Power
It appears that with the release of 7.2, Red Hat no longer offers it's $30 "Standard" edition. You must choose between the $60 workstation-based edition and the $200 "Professional" edition.
I've worked with versions 5, 6.1, 6.2, and 7.1 of Red Hat. This page was orginally written for Red Hat 6. However, I have found that with each new version Red Hat gets more and more proprietary. Version 7.x is real bad in this respect (it no longer has linuxconf or inetd). As a result, many of the Web pages, HOWTOs, and Linux books can no longer even be used with version 7.x
In it's pursuit of profits Red Hat is getting to be like Microsoft. This will only get worse as newer versions come out, and even more so if they get taken over by someone like AOL/Time-Warner. Their revenue streams are based on support and training so they have a vested interest in making their flavor of Linux as proprietary as possible. The mixed signals Red Hat sent to the organization trying to establish standards for Linux distributions (the LSB) speaks volumes.
My advice: Don't use Red Hat.
If you base your operation on Red Hat, you'll end up in the same position as Windows users. Your OS vendor will have you by the short hairs because their proprietary product forces you to go to them for any upgrades or support.
What To Use
Caldera, SuSe, and Slackware are all commercial ventures who's days may be numbered due to the dominance of Red Hat. Debian isn't owned by anyone. It is a true GNU (public) Linux OS built by volunteer Linux enthusiasts from around the world and it is considered to be the "pure" Linux. A lot of Websites have download links for it. However, Debian is a seven-CD set so even with a broadband connection it will take a long time to download. You can buy the CD set for less around $15 from numerous Web sites. Make sure you get the "binary" x86 CD set for use on a PC, make sure it's the latest stable release.
While it may seem unbelievable that having an older Pentium system, or even a 486, and $30. means you can have your own Internet server, the information on this page shows it can be done. (This is one of the reasons why Linux-related companies are so popular with Wall Street.) Actually you don't even need the $30. Due to it's freely distributed nature, you can find CDs containing Linux just about anywhere, including in the back of most Linux books. Ask around and you'll probably find someone with a spare Linux CD. Due to the fact that I've got about 12 books on Linux I've got about 10 Linux CDs. Another alternative is to take the $30. and buy a Linux book and you'll not only have the book but Linux as well. Just make sure that the book covers installing the Linux included on the CD.
Linux is the name of the operating system. However, unlike Windows it is available from many different companies. These companies may add their own extras to the operating system (like a graphical install routine), but they all have the same Linux "kernel" (i.e. guts of the operating system). These Linux packages from different companies are called "distributions". The Red Hat distribution is the most popular. Caldera, Debian, and Suse are other distributions. I've only played around with Red Hat distributions (v5 and v6.1) and this page is based on my experiences with v6.1. If you buy a book with a CD included, check which distribution it is. If it isn't Red Hat, Caldera, Debian, or Suse you may want to find another book. I say this only because the more popular packages will have more educational resources available on the Web.
Linux is an OS with a character-based interface like DOS. And just as Windows 3.1 provided a GUI interface to DOS-based systems, Linux also has GUI interfaces available. The most widely-used GUI is Gnome. KDE is another popular GUI. But since it doesn't make a lot of sense to have two different GUIs on one system, in the installation routine below you will only install Gnome. (Actually Gnome is only part of the GUI interface. See the GUI Workstation Notes section below for more info.)
Drawing on the Windows comparisons a little more, you may be familiar with Windows NT. There are two versions of Windows NT, Server and Workstation. With Linux there is only one version, and a Linux system can be either a server, or a workstation, or both. You decide if the system is a server or a workstation simply by the applications you run on it. The installation routine below will install both server and workstation applications, and the sections that follow it address both functionalities. By following the installation routine below, you'll end up with a system similar to the following. (The Star Office Suite comes with the Red Hat distribution but has to be installed separately.)
I've drawn comparisons between Linux and DOS, but Linux is very similar to UNIX. If your goal is to be a UNIX administrator (and those guys make BIG bucks), learning Linux will get you 90% of the way there. That's not an exaggeration. I recently took a UNIX class (which used an IBM server with AIX - IBM's flavor of UNIX) and I didn't encounter anything in my assignments that I couldn't do on my Linux system.
Just as Linux has the several GUI interfaces mentioned above, it (and UNIX) also have several character-based interfaces called "shells" to choose from. DOS only has one character-based interface, or shell, and it is the command interpreter in the COMMAND.COM file. When you open a DOS window under Windows 9x/NT you are running a character-based command interpreter. UNIX has three standard shells; C, Korn, and Bourne. The Korn shell is the most powerful when it comes to running "shell scripts". Shell scripts are analogous to DOS batch files. That is, shell scripts are text files that contain a series of shell commands.
Linux has it's own versions of these three popular UNIX shells plus a few of it's own. One is called "Bash", for Bourne-Again Shell, and it is the default shell for most Linux distribution installations. Linux even comes with a Korn shell, which was the shell we used in my UNIX class because of its' enhanced scripting features.
The COMMAND.COM shell is what gave you the "DOS prompt" (>) when you booted a DOS system. The Linux/UNIX shells have their own prompts (% or $ depending on the shell) which change to a # if you log in as "root". "root" is the super-user account in UNIX/Linux, similar to "administrator" with NT or "supervisor" with Novell.
If you're a nerd at heart, believe me when I say you will LOVE UNIX/Linux. It has so many features that it boggles the mind. It's an OS that you could play around with for five years and you'd still find new capabilities and functionality. To say it's like DOS on steroids would be an understatement. It's strong suit is the ability to automate operations due to its' myriad of functions and strong scripting capabilities. Sign up for a beginner's UNIX class at your local community college and you'll see what I'm talking about. Even in a basic class you'll learn about a lot of the neat things it can do. The one down-side to UNIX/Linux is that it's not a user-friendly OS so there is a learning curve involved. Using one of Linux's GUI interfaces is helpful in this respect but to really learn this OS you'll want to use one of the character-based shells. Don't be discouraged if you find Linux confusing. Due to its' myriad of commands and capabilities that's not uncommon. I've found taking a UNIX basics class at my local community college to be VERY helpful. However, I also found it very helpful to do a little reading up on Linux before starting the UNIX class as it allowed me to better understand and appreciate what was being taught. If you've done any Perl programming you will find that knowledge helpful also, not only for shell scripting but for command-line operations as well.
There are two different aspects to jobs working with Linux/UNIX, but they can often overlap. You can either get into programming, where you are writing shell scripts and programs which can be written in a wide variety of languages, including C. These scripts or programs are often used in the middle or "back-end" tiers of a "multi-tier" client/server system. For instance, UNIX/Linux servers are often used as back-end database servers running Oracle. The other aspect is as an administrator where you are doing pretty much the same things you do with a Novell or NT server; managing user accounts, access rights to files, protocol configurations, processes, etc., in which case the UNIX/Linux server is simply providing file and/or print services as well as user authentication. (The Samba package that comes with most Linux distributions allows a Linux server to act as an NT server to Windows clients.) In large organizations these two aspects are usually segregated with different job titles. In smaller organizations you may end up doing both, which would be the best training you could ask for. Both of these positions deal with Linux/UNIX servers which can be accessed via dumb terminals, some Windows-based terminal emulation package on PCs, or from Linux/UNIX workstations.
When Linux or UNIX are used as a server there are two possible functional areas; as an internal network server much like Novell or NT, or as an Internet server. With the later your are less concerned with user accounts, etc., and more concerned with configuring and monitoring the Internet applications that run on the server (Web, mail, FTP, DNS, etc.). While it is certainly possible for a single server to handle both internal and Internet functions, it is wise to put each function on its' own server for security reasons. Note that an administrator will find their life much easier if they are a good shell script programmer. The better they are at writing shell scripts the more they can automate administration tasks on the servers.
When you go to purchase Red Hat you will notice there are three editions; the standard $30. package I refer to here, a Deluxe Edition, and a Professional Edition. The Deluxe Edition ($70.) is more workstation-based. It has more user applications. The main difference with the Professional Edition ($150.) is that in addition to the standard Apache Web-server software, there is also secure Web-server software for setting up on-line transactions. You can purchase these packages at a store or you can order them directly from redhat.com. However, the $30. standard package is way more than enough for any first-time Linux user. I wouldn't even consider getting the higher-priced packages unless you have a very compelling reason for doing so.
First off, while it is possible to put Linux on a system with an existing Windows partition I wouldn't recommend it. Not because of Linux itself, it's a very stable and robust OS. It's because Linux has a boot manager called lilo that will allow you to set up a dual-boot configuration between Linux and your Windows partition. "Neat!" you say, and it is, but you have to do this by writing to the MBR (Master Boot Record) of your hard-drive. I wouldn't recommend any first-time Linux user try and set up lilo on their primary system. If you trash the MBR you could be screwed. The DOS FDISK command has an option for rebuilding an MBR but I've found that it doesn't play well with Linux partitions.
And that brings up another point. When you install Red Hat you may, or may not depending on which options you select, have to use DiskDruid to set up your Linux partitions. If you don't know what you're doing you could wipe out your existing partition. In short, get your hands on an old 486 someplace and do your first install on that. In fact, do several installs trying the different modes and classes. (I'll get to those in a little while.) Besides, having a separate Linux system means you have greater freedom to "play around" with it and try different things and experiment. If you really hose it up, no big deal, just re-install.
You can get 486s pretty cheap these days and even lower speed (90, 133, etc.) Pentium systems. Cheap insurance and a low-cost investment in your education. Here's what you'll need hardware wise:
- 468 (Pentium is better, especially for a server)
- 32 meg of RAM (64 or 128, especially for a server)
- 1.2-gig hard-drive (2-gig is better for a server)
- 1.44-meg 3.5-inch floppy drive
- CD-ROM drive (preferably IDE)
- a Microsoft-compatible mouse
The important thing about hardware when it comes to installing Linux is you need to document everything. Write down the make and model and geometry (heads, cylinders, tracks) of your hard-drive, the make and model of your video card and probably more importantly the "chipset" on it, make and number of buttons of your mouse, make and model of your monitor, sound card, network card, CD-ROM drive (especially if it's attached to a sound card) and any other optional devices you may have. Having played around with both Red Hat 5 and 6 I am happy to say that 6 seems to do a much better job of detecting hardware so you may not need all the above information, but you'll want to have it handy in case something isn't properly detected. It does a good job of detecting an IDE CD-ROM drive hooked up to the secondary IDE channel, which is better than having it connected to a sound card. (Note that in some cases the CD connection on a sound card is the secondary IDE channel. You'll have to check your sound card documentation.)
There are several terms you want to keep straight with a Red Hat install.modes - There are two install modes that refer to the user interface, GUI (default) or text.
class - There are several pre-defined classes of install that you can select from later in the installation process. They are
packages - different software applications, utilities, interfaces, OS options, etc.
- Workstation with the Gnome GUI desktop (like Windows)
- Workstation with the KDE GUI desktop (also like Windows - just someone else's product)
- Server (no GUI desktops installed and all server packages installed)
- Custom (you choose the packages to install)
The above 4 selectable install "classes" are nothing more than pre-defined combinations of "packages". Because of this, doing a Custom install is the best. Why? Because when you choose the packages you can have a system that's both a workstation and a server.
When you do a Custom install you get a screen where you select which packages to install. At the bottom of the list is an "Everything" selection. Choosing this will cost you about 1.4 gigabytes in hard-disk space. But I only specified a 1.2 gig hard-drive above for a reason. You don't need both GUI desktops (Gnome and KDE). You also don't need to put the extra documentation that comes with Red Hat on your hard-drive, you can leave it on the CD. Not installing these two things will cut your hard-drive requirement down to 660 meg (roughly half as much) and that will still give you a lot of free space on your 1.2 gig hard-drive. So when you are presented with the list of packages don't choose the "Everything" selection. Instead,
Go down the list and choose all the packages except "KDE" and "Additional Documentation"
Naturally, if you have a 2 gig or larger hard-drive, you can select the "Everything" selection at the bottom.
Red Hat 6.1 (which is what I most recently bought) comes with a CD and a boot floppy. All you have to do is put the CD in the drive and boot off the floppy. When the boot process first starts it pauses for a few seconds while displaying a screen with 4 options and giving you time to choose one of them by typing in the specified text at the boot: prompt.
The first selection is the default and will be automatically selected when the booting resumes if you don't do anything. It's for the graphical install mode. You can choose option 2, the text install mode, by typing in text at the prompt and hitting Enter. You may want to try doing a graphical "Workstation" install just to see how easy it is. Then do a text "Custom" install right after that. You should at least have seen the text install once in case you ever have to work with an earlier version of Linux. (Just boot off the floppy every time you want to do an install.)
Partitions and Mount Points
When you do a Custom install you have to create the partitions using DiskDruid and it can be a little confusing if you've never worked with Linux before. For each partition you create you need to enter a "mount point" for it. And just one big Linux partition isn't good enough. You'll need to create three of them. When you create partitions you select the type of partition from a drop down list. You're only interested in two types, "Linux Native" and "Linux Swap". Create them in the following order using the specified mount points:
Partition Type Size Mount Point Linux Native 16 meg /boot Linux Swap 64 meg (none to specify) Linux Native remaining
Note that the mount point for the last partition is just a forward-slash. This is the "root" partition of the file system. (Don't confuse the root of the file system with the superuser "root" account. They're two totally separate things.) Note also that during a Custom installation the disk partitioning comes before the package selection (opposite of the way I presented it here), but these are the "worst" parts of a Custom install. The rest is pretty easy to figure out.
During the installation you'll be asked for a password. This is for the "root" account. Remember this password as you will need it in bit. (Don't use a "dictionary word" for a password as hackers use tools that compare your encrypted password to a listed of encrypted words in a dictionary as a means of finding out what it is.) Near the end of the installation you are asked if you want the system to automatically start the GUI desktop (like Windows) every time it is booted. I would suggest answering 'No' to this as there are times when you will want to use the text interface, and it is very easy to bring up the GUI desktop when you do want it. Once the installation is finished the system is supposed to reboot (be sure to take out the floppy disk). It didn't always do that for me. A few times it just went to the login prompt. If it doesn't reboot for you, just take out the boot floppy and press Ctrl-Alt-Del.One other note: if you are doing a re-install, the partitions will still be there, but you will have to re-enter the mount point information for the two native partitions.
Once the system reboots you'll be faced with a login prompt. Log in using the ID root and then enter the root password you entered during the install. After you've logged in you'll be placed in the root's user directory on the root partition. (In Linux/UNIX, root means "the top of the system". The user "root" is also called "super-user" because when you are logged in as root you have administrator access to the entire system.
The first thing you should do when you are logged in as root is create a non-root account for yourself. Do that by:When you're logged in as root and you use the passwd command for another user, the system will simply prompt you to enter, and then re-enter for verification, a password for the user. You may get a message saying something like "BAD PASSWORD - Too Short" or "BAD PASSWORD - Dictionary word" (meaning it's a common word). The "BAD PASSWORD" messages are advisory only and the system will still accept them. However, I strongly recommend you heed these warnings and come up with a more secure password.
- using the useradd command followed by the user-name
(Note that the UNIX command to add a user is adduser but Red Hat installs a feature called "password shadowing" by default for extra security. This feature involves using slightly different utilities which interact with the password file.)
- and setting the password for the new user-name using the passwd command
Before we go on there is one very important thing you should know about UNIX/Linux:
UNIX/Linux IS case-SENSITIVE !!!
When you see examples of commands, etc. on this page, they must be entered exactly as shown. For example, a -f has a totally different meaning than a -F in UNIX/Linux command. Case-sensitivity also applies to passwords and file names. All of the following file names would be different files under UNIX/Linux:README
File Things To Know
UNIX/Linux treats everything like a file. When it's writing to your screen it thinks it's just writing to a file. When it writes a string to your modem it thinks it's just writing to a file. As a result, all your hardware, including ports, hard-drives, video cards, etc. on your system must be represented somehow somewhere in the file system. Off of the root of your file system is a directory called /dev and "dev" is short for "device". In this directory you will find a lot of different files all relating to hardware. These files are device drivers, not unlike the device drivers you use for DOS or Windows. It's the device driver file that handles the communication with the actual piece of hardware.
I am often not able to access CDs in the CD-ROM drive after my system starts up. I have to manually enter a command to "mount" the CD-ROM drive before I can access it. There's probably a way to add this command to some startup file but I haven't had time to figure that out yet. My CD-ROM drive is the first drive on the secondary IDE controller. As a result, the command I use to mount my CD-ROM drive is:
mount -t iso9660 /dev/hdc /mnt/cdrom
I know this looks a little cryptic at first but it's really quite simple.
- 'mount' makes a device part of the file system.
- '-t iso9660' specifies the format of the file system being mounted. (The 'iso9660' could be 'msdos' if we were mounting a floppy drive with a DOS-formatted floppy in it.)
- '/dev/hdc' is the path to the CD-ROM drive's device driver file. The 'c' in the 'hdc' indicates the third hard-drive. With IDE drives, the third hard-drive is the first hard-drive on the secondary IDE channel. With SCSI hard-drives I believe the third hard-drive would be 'sdc'.)
- '/mnt/cdrom' is the sub-directory to map the device to so it can be accessed. (This has to be an existing directory but it can be any directory you want. You could use the mkdir command to create a directory called "shiny-spinning-thing" and replace '/mnt/cdrom' with '/shiny-spinning-thing'.)
Tip: The mount command to access a DOS formatted floppy in the first floppy drive would be:
mount -t msdos /dev/fd0 /mnt/floppy
Using the first mount command above "mapped" the CD-ROM drive to a sub-directory. In order to access the CD-ROM drive I just go to it's sub-directory by entering
or simply navigate to the mnt folder using File Manager (similar to Windows Explorer) if you're using the GUI interface (see the next section).
Another thing to note about dealing with files in UNIX/Linux is that file extensions mean nothing to the OS. Recall that as a carry-over from DOS, many files in Windows have the three-character file extension and that this extension is separated by a period when the file is specified (ex: word.exe). Windows knows a file is a program ("Application") type of file because it has a .EXE extension. In UNIX/Linux there are no extensions. The file name can contain periods but what comes after the period is not an extension to UNIX/Linux.
You could name a file this.is.a.file if you wanted to. It's all the same to the OS. So how do you tell UNIX/Linux that a file is a program (application) or script? UNIX/Linux has a set of "permissions" for each file. These permissions are read, write, and execute. You simply grant the execute permission to a file that is a program or script. You could grant the execute permission to a file that's not a program or script, but since the OS will try and execute whatever statements are in the file as if they were shell script commands, you'll likely end up with a lot of error messages. Depending on what's in the file, you could also end up with disastrous results like a trashed hard-drive.Note that some UNIX/Linux applications may use a certain set of characters after a period in the file name to specify their data files. For example, the Apache Web server software looks for files that end with .htm, .html, and .shtml and these could be thought of as extensions. Technically however, they're not. And to the UNIX/Linux OS they mean absolutely nothing.
I won't go into permissions in detail here. It's one of the key points to learn about the UNIX/Linux OS and just about every book on UNIX or Linux covers it. I just wanted to make you aware of them and how they relate to the way you can name files. If you're a Webmaster you may have already worked with permissions. When you use the chmod command you are using the UNIX/Linux command that sets file permissions.
If you want to make your Linux experience a little easier, type in the following command at the shell prompt:
alias dir="ls -laF"
This lets you use dir instead of the UNIX ls command to list files. The ls command without any parameters gives a very simple listing which doesn't even indicate which items are directories and which are files. To get a good detailed listing you need to use ls -laF but that's a lot to type all the time. After issuing the above command, typing in dir at the shell prompt will produce a result like this:
drwxrwxrwx 3 keith web 4096 Aug 8 03:59 ./ dr-xr-sr-x 3 keith web 4096 Aug 6 13:56 ../ -rw-r--r-- 1 keith web 17181 Aug 6 16:04 bdl21dlx.zip -rwxr-xr-x 1 keith web 15818 Aug 6 16:04 bdlogger.pl* -rw-r--r-- 1 keith web 1 Aug 6 16:04 history.log -rw-r--r-- 1 keith web 1 Aug 6 16:04 pagehits.cnt -rw-r--r-- 1 keith web 1 Aug 6 16:04 period.log -rw-r--r-- 1 keith web 30586 Aug 6 16:04 readme.txt -rw-r--r-- 1 keith web 1 Aug 6 16:04 trigger.dat drwxrwxr-x 2 keith web 4096 Aug 8 03:59 zips/The / after "zips/" indicates it's a directory (as does the "d" in the first column of the permission block on the left). The * after the bdlogger.pl file name indicates it's flagged as executable. The -rwxr-xr-x (which is 755) in the permission block for the bdlogger.pl file also indicates that it's flagged as executable.
Also be aware that UNIX/Linux does use the period in file names for one special circumstance. File names that start with a period are usually configuration files. Normally every user will have a file called .profile in their home directory on a UNIX/Linux server. In this file are commands which set up the user's environment (default shell, values for environmental variables, etc.). It is somewhat like the config.sys file in DOS. The vi text editor has its' own configuration file as do the character-based versions of telnet and ftp that come with UNIX/Linux.
Another thing you may find helpful is to have your current default directory (called your "working directory" in UNIX/Linux) displayed in the shell prompt. You can do that using the export command as follows:
If you're familiar with DOS, this command, along with the aliased dir command above, will make you feel more at home on your Linux system.
Speaking of home, if you want to return to your home (personal) directory from anywhere on a UNIX/Linux system, just type in cd and hit Enter.Who da man !FYI: Speaking of home directories, if you've ever used a program like WS_FTP to make an anonymous ftp connection to an ftp server, you've probably seen several folders (bin, etc, lib) with one called pub (for public download files). The path to the directory where these folders are located, in other words your default path if you anonymous ftp into your server, is /home/ftp
Your "Web root" directory (where your html files should go) is set up during the Apache install. The path to it is /home/httpd and in it you will find the cgi-bin directory.
The UNIX and Linux OSs have built-in, on-line help. They're called "man pages". All you have to do is type in man followed by the name of a command. For example:
However, be advised that these pages were written by the same type of people who wrote the operating system. As a result, they're just this side of being understandable by us mere mortals. But they may help you out in a pinch. When you're done viewing a man page, just hit 'q' to quit.
You can't just turn off a Linux system like you would a DOS system. It has to be "shut down". If you want to leave it running, you can just log out of the system by typing in exit at the shell prompt and the login prompt will re-appear. If you want to turn the system off, there are several shutdown commands you can use but on Red Hat systems (not every Linux distribution supports this) I find it much easier just to hit Ctrl-Alt-Del . Unlike a DOS system, doing this will not immediately reboot the system. It will first shut down all processes and dismount the file systems. Once it starts to reboot you can turn the system off.
If you want to keep the system running but not be logged in (as in the case of using the system as a server), just type in exit at the shell prompt. This will log you out and return to the login screen.
Keep in mind that the above installation is meant to set up a generic Linux system that will allow you to become familiar with Linux and play around with its' many features. If at some point you want to set up a serious Linux Internet server, you'll want to wipe out the partitions and re-install Linux so you can divide the file system up into more partitions for security reasons. For instance, instead of /usr simply being a directory of the Native partition, you'd want to create a separate /usr partition. Partitioning the file system allows you to mount the various parts of the file system with different security settings.
You may be familiar with the fact that you can set up different "user profiles" on a Windows 9x system and have people log into the system in order to use their profile. Windows NT Workstation (and 2000 Professional) requires that you set up a local user account on the system and log into it each time you start the system. Because Linux/UNIX is a multi-user OS, you likewise have to create a user account for each person using the system, even if it's only one person. You don't want to use the "root" account for routine use of the system. It leaves the OS wide open to virus attacks and malicious or renegade programs. You should only use the "root" account to create the user accounts and for system management.
When you boot your Linux system it will always come up with a character-based login prompt. Once you've logged in you can start the GUI desktop by typing in startx at the shell prompt and pressing Enter. The "x" comes from the term "Xwindows", which is a term for the GUI on UNIX systems. Actually, the GUI on a Linux system consists of three separate pieces of software:
XFree86 - the "X-server" that handles requests from the other two pieces and interacts with the hardware on the video card and monitor.You really don't need to be concerned with all of this to use a GUI. I just wanted to present it here because you'll see things like "X server" and "Enlightenment" pop up from time to time and now you'll now what it's referring to. While it may seem overly complex, it's this modularity that gives Linux its' flexibility. You can use different X servers, desktop managers, and windows managers (as long as they're compatible with each other) instead of being locked into whatever the OS manufacturer wants to provide (ex: the Microsoft Windows interface).
Gnome or KDE - The "desktop manager" that handles the Windows-like task bar and it's menus, desktop icons, etc.
Enlightenment - A "windows manager" that handles the displaying and manipulation of any windows that you open up in the course of using the GUI.
The Gnome GUI interface is similar to Windows 3.x in that it is a GUI interface which runs "on top of" a character-based operating system. However, it's appearance is much like that of Windows 95. It has a task bar and it's equivalent to the "Start" button is a button with a foot print on it (The foot print is somewhat in the shape of a 'G'.) If you used the above installation procedure, a button for launching Netscape should also be on the task bar. However, before you can use Netscape you have to set up the dialer, which we cover below. You can still start Netscape if you want so you can enter your ISP and user settings so you'll be ready to go once you do get the dialer set up. These settings are entered the same exact way you would enter them for the Windows version of Netscape.The Start menu will have entries for all of the applications, games, and utilities that were installed. The "File Manager" selection mentioned at the end of the previous section is on the main Start menu. My $30. Red Hat package included a separate CD with Star Office 5.1 on it. This is a suite of desktop applications (word processor, spreadsheet, etc.) which creates data files that are compatible with Microsoft's Office suite.Note: If you are going to be installing your system in a location where you have access to the Internet via a LAN, you would want to install a network card in the system instead of using a modem and the dialer setup given below. A network setup using a network card is a lot easier using the GUI interface. Just click on the "Start" button to bring up the menu and select System and then Control Panel. This will bring up a button panel with several large icons on it. Click on the Networking icon to bring up the networking configuration window.
Another Note: There's an excellent GUI utility for checking out and configuring your system. Once in Gnome, click on the "Start" button and select System and then linuxconf.
Just because the GUI is covered in this section, the GUI is not just for workstations. You can use the GUI to manage a server. The linuxconf utility mentioned above provides access to many server-related settings as well.
If you use the above install routine the Apache Web-server software will be installed. Getting your system to respond to requests from Web browsers is not at all difficult. The real cost of having your own Web server is not so much the hardware and software but the cost of having the system on the Internet. If you are thinking of setting up a Web server at your job where the organization already has a 24/7 connection to the Internet this is not a concern. However, if you're currently accessing the Internet via dial-in access, you'd have to look at ISDN, DSL, or a cable modem to connect your server to the Internet. (See the discussion on cable vs DSL below.)
If your plans are to set up a real Web server on the Internet, you can have the server connected to the Internet and your home or office network at the same time by installing two NIC cards in the server. One NIC would connect to your internal network and be set to pick up an IP address from your internal DHCP server. The other NIC would connect to your ISP connection (via a ISDN, DSL, or cable router) and you would assign a static IP address to it. The static IP address you would use would be dictated by your ISP. (This would be especially useful if you want to use the system as an e-mail server using the Sendmail software.) However, unless you are very good at setting up firewalls, this is not a good idea. With this two-NIC setup your Linux system could act as a bridge from the Internet into your internal network. You are better off having a stand-alone Web server with a single NIC connected to the Internet (your ISP). There is no threat to your internal network with a single-NIC setup.
DNS (Domain Name Service) is the process which translates a domain name into an IP address. DNS servers have a series of "zone records", each of which contains a domain name and IP address. In addition to getting a static IP address from your ISP (to assign to your server's NIC card), you will also have to have them set up a zone record on their DNS servers for your system. My ISP charges a one-time $25 fee for this service. When you set up a domain record on Network Solutions, one of the things you have to enter is the "Technical Contact". A representative from Network Solutions told me that the Technical Contact specified in the domain record should reflect where the server is physically located. So even if your using an ISP for DNS services, as long as you are operating your own server you should be the listed technical contact.
Perhaps the best reason for having your own server is reliability. The dirty little secret of the Web hosting industry is that they will host 300 or more domains on a single Linux box. So unless you want to cough up hundreds of dollars a month for a "dedicated" hosting package where you get your own server, going with a hosting service will put your site at the peril of hundreds of other Webmasters messing around with the server your site is on. They may claim "99%" reliability but that's rarely the case. And even if it is, that's a monthly figure so your site can be down for eight hours each month to stay within the 1%.
Note: Along with having your own Internet server comes the responsibility of securing it. I set up a Web server at work and within three months someone had hacked into it and was in the process of setting the server up for use as an "IRC bot" (chat relay). This was a server that wasn't even in full production at the time and it had not been promoted or submitted to search engines.Apache has a configuration file called httpd.conf that contains a myriad of directives that allow you to customize your Web server's configuration. Perhaps one of the most useful is the VirtualHost directive that allows you to host multiple domains on a single server. It's what the hosting services use to squish 300 domains onto a single box. You can just as easily use it to host more than one domain on your server.
Security problems stem from the fact that most Linux distributions tend to enable most systems features by default during installation. Hackers cruise the 'Net looking for servers with vanilla Red Hat installations because the default installation setups offer easy entry into the system. You don't necessarily have to firewall a stand-alone Internet server. You can simply close some of the software doorways into the system.
The obvious benefit of having your own server is that you can configure it any way you want and give yourself all of the bells and whistles that the hosting services charge extra for; including ftp, e-mail accounts, telnet, as much disk space as you want to install in the machine, etc. Since you can configure a server to host multiple domains, if you are paying to have multiple sites hosted there could actually be a cost savings each month by having your own server. However, if you're going to get serious about setting up your own Web server, naturally you'll want to get a serious system with more horsepower than the 486 system I outlined above. More importantly perhaps, is to make sure you have some sort of tape backup drive on whatever system you use. If you are going to go through the effort of setting up a serious Web server, you'll certainly want to be able back it all up so that all is not lost in the event of a hard-drive failure.
If you want to get your server on the Internet just to see if it works, you can do so easily if you have two telephone (dial-up) lines. Most ISPs do not prevent you from having multiple simultaneous logins on their PPP accounts. You can use one telephone line to dial into your ISP using your Linux system and the other telephone line (and your Windows system) to dial in so you can use your Windows browser to access your Linux system over. The next section shows you how to do that.
Believe it or not, if you just want to play around with Apache to see if you can access its' default Web page you don't have to do much of anything except start it up. Most of the default values for the Apache settings are appropriate. This is even the case for a serious Web server, but a few may need to be changed for your particular installation. One setting for example, is where you enter an e-mail address for the Webmaster. But if you're just going to see if you can access the server over the Internet in a test fashion, you don't even have to bother with that.
One thing to note is that Apache (and most other server packages) are "daemons" (pronounced dee-mons). Daemons are applications that run in the background, waiting for some specific event to trigger them, such as an incoming request from a Web browser.
Be sure you are logged in as root before proceeding.
In order to have your system dial into your ISP you have to set up the Linux dialer software. This is going to be different from one ISP to another. Below are the instructions my ISP gives for connecting a Linux system via a PPP dial-in and how to check to see if your Web server is actually working.
Before you set up the dialer you should have your modem connected to the system. I would recommend an external modem so you can tell by the indicator lights if you have a connection or not. The Linux dialer software doesn't provide any feedback indicating whether a connection attempt was successful or not. I just used an old external 28.8 modem since the traffic to the server would be small. I connected the modem to the Com2 port with the system power turned off. When I turned the system on a program called Kudzu popped up during the boot process. Kudzu is a hardware detection program which will give you the option of saving the new hardware configuration it detected. This identifies the modem to Linux. The dialer setup is a separate issue.Note that once you have this set up, you can also use it to dial in and then fire up your GUI desktop to use your Linux system as a workstation. Since the above install routine also installs Netscape 4.6 for Linux, you can use your Linux system to surf the Web, even while the Apache Web-server daemon is running. In other words, your Linux system can be a Web browsing workstation and a Web server at the same time.
PPPD is the default Linux dialer and it got installed into the /usr/sbin sub-directory when you installed Red Hat. The dialer setup consists of creating or modifying four separate files. You create/modify these files using a Linux text editor. If you're new to Linux, the pico editor is the easiest to use. It is used just like a DOS text editor, and pico has the key commands listed along the bottom of the screen. (Note that the '^' shown with these key commands represents holding down the Ctrl key.)
Remember that the next few steps are for my ISP. They may not work with your ISP. Check the tech support section of your ISP's Website to see if they have Linux dial-in instructions. If not, you may be able to get something working by using the steps below and substituting the appropriate values where necessary.
- The PPPD dialer program uses several scripts that are installed in the /etc/ppp sub-directory. Go to it by typing in
- There is a script file with the name of ppp. Open this file in the Pico editor by typing in
- Enter the following line in the ppp script file:
ppp /dev/modem 57600 connect "chat -v -f /etc/ppp/script"
- Press ^X to exit the editor and answer 'Yes' to the prompts to save the file.
- Use pico to open the file named script in the same sub-directory (i.e. pico script) and add the following line to it:
"" ATZ OK "" "" ATDT555-1212 CONNECT "" ogin: userid word: password
where "555-1212" is your ISP's telephone number, "userid" is your PPP dial-in user ID, and "password" is your PPP dial-in password. Exit pico saving the changes to the file.Note: The two file entries in Steps 3 and 5 must include the spaces as indicated in the entries. The spaces are not optional.
- Set the permissions to the two files you just modified by typing in the following two commands:
chmod 700 ppp
chmod 600 script
- Open (if it exits) or create a file named options by typing in the following:
and enter the following lines into it and then save it:
- Go up one level to the etc directory by typing in
- Use pico to edit the resolv.conf file by adding the following lines (entering your ISP's values instead of the ones below) and then saving it. Note that the two "nameserver" IP addresses are probably listed on your ISP's technical support pages as "Primary DNS" and "Secondary DNS".
- Do a Ctrl-Alt-Del to restart the system
Checking Your Server
Once the system re-starts, log in as root and try it out! To test your Web server;
- Start the Apache software by typing in httpd
- Dial into your ISP by typing in ppp
- Once you've connected you have to find out what IP address your ISP assigned your Linux system. You can do this by typing in ifconfig and look for the inet addr: entry in the ppp0: section. (If you don't have a ppp0: section listed you didn't successfully connect or log in to your ISP.)
- Go to your Windows system and dial into your ISP using your other telephone line.
Bring up a DOS window (Start/Programs/MS-DOS) and see if you can ping your server. Do this by typing in ping followed by a space and the IP address your Linux system was assigned. Example, if the IP address of your Linux system was assigned was 22.214.171.124 you'd type in
You should get an indication that the server is responding. Close the DOS window by typing in exit
- Now fire up your browser and enter the IP address in the location line. Example
and see if the default Apache Web page comes up. You're not truly going over the Internet to access your server because both systems are within your ISP's domain. But if you want, call someone in a different state and have them try to access it. Before calling them you could come up with an "home-server home page" and replace the default Apache page with it.
Once you've got that working you should also be able to use WS_FTP or another ftp application to ftp into your server using the IP address to designate the host, and using an anonymous login. The directory structure you see after doing an anonymous ftp login is located under the /home/ftp subdirectory. Create a non-root user account on the server for yourself and try to telnet into your server and log in using that non-root account. (I couldn't log in as root via a telnet session. I suspect it is some sort of default security setting but haven't had time to check into it further.) Windows has a built-in telnet program. Just click on the Start button, select Run, and enter telnet and click on OK. When you log in on a UNIX/Linux system you are automatically placed in home (aka "private") directory for that user. Typing in cd / will take you to the root of the file system.
Beyond that you can start playing around with the CGI capabilities of Apache or try playing around with Sendmail or some of the other server packages on your server. Sendmail is already running on your server because UNIX/Linux servers run a mail package automatically for user-to-user messaging on a local network. You'll have to find some Websites that have instructions on setting up Apache CGI or Sendmail. The neat thing is you get an aweful lot of new toys to play with for $30.
DSL vs Cable-modem
If you are currently using a Web hosting service to host your Web site(s), having your own server may not cost you much more. Yes, the cost of a DSL line or cable-modem hookup to your home or office may cost more than your current dial-up connection, but you won't have the monthly hosting costs. Not to mention the fact that if your ISP offers a DSL option, the cost of your account with them is often included in the price of the DSL service (check with your ISP on that).
While DSL and cable-modem operators do offer residential services, these services typically do not allow for a dedicated IP address. Your server will need a dedicated IP address for a DNS entry so you will need to get a "business account" even if your server is at home. Residential DSL service is also typically much slower in the "upload" direction which would be bad for people trying to pull information off of your server. Business-class service is the same speed in both directions. This is known as symmetrical (SDSL) service. You don't want asymmetrical (ADSL) service if you're going to have your own Web server. With ADSL service, people pulling pages off your Web server will find the response and page-loads very slow.
Note that while the "baby bells" do offer static IP addresses with some of their business DSL packages, they only offer Asymmetrical DSL service. I suspect this is because they don't want SDSL cutting into their high-priced T1 and fraction T1 business (which are also symmetrical).
- If you get the more expensive business-class DSL service you receive a DSL router (instead of a DSL adapter for a single computer) which you can plug into an Ethernet hub. This means that all the computers on your network can share the Internet access.
- Most cable-modem providers charge extra for each additional PC you want to have use the Internet access. However, Linksys (www.linksys.com) and D-Link (www.dlink.com) both sell a Cable/DSL router for around $120 that would allow you to get around this. But hook it up after the cable guy leaves because the cable companies do not support the use of them. (They will also not help you if you have problems when using one.) Like the straight DSL router, you just plug the cable into the Cable/DSL router and then into your hub to share the access.
- The speed of your connection is dependent upon your physical distance from a telephone company facility. You may be limited to a 144 kbps service if you are beyond the distance limitations of the higher-speed service.
- Cable-modem users share their pipe with other cable users. The more users in your neighborhood that use the service the slower your speed will be.
- Your "up-time" is dependent on the reliability of your local telephone service which is typically less susceptible to weather-related problems and does not involve neighborhood line power provided by your local electric utility.
- If your cable-tv service often goes out due to storms or other weather-related events, your Internet access will also go out. The electronic components used in the cable distribution network (mounted on utility poles, etc. around town) use line power in those neighborhoods. This means that you are also affected by power outages that occur for any reason. If the power goes out anywhere between you and your cable service provider, your service will go down.
- The costs for business-class DSL service in my area are as follows:
- 144 to 192 kbps - $135/mo
- 384 kbps - $230/mo
- 768 kbps - $275/mo
- 1.1 Mbps - $350/mo
- Free installation (includes additional telephone line if needed) but there is a $135 fee (after a cash-back rebate) for the DSL router.
- The costs for business-class cable-modem service in my area are as follows. Speed will slow with more users but plan for around the 768 figure used to the left for comparison.
- One computer - $103/mo
- Each additional computer - $45/mo
- Installation - $150 for one PC ($50 for each additional PC)
When comparing business-class service (recall that you need business-class service because you need a dedicated IP address for your server), using the 768 kbps DSL service, the cost is about the same if you're planning on having seven to eight computers use the service. One key point is reliability. If high up-time is more important to you than cost, the DSL option would be preferable. The DSL option also lets you select slower services for less cost. One note about the DSL-only and Cable/DSL routers; newer models do DHCP and PAT (Port Address Translation) which means you don't have to worry about configuring your server to hand out IP addresses to workstation PCs, or worry about setting up a proxy server. It can be strictly an Internet server. Also, some routers may have multiple jacks for connecting computers so if you want to give Internet access to only three or four computers you wouldn't even need a hub. You could just plug them directly into the router.
Don't forget about the ISP side of things. With a lot of ISPs you sign up for DSL service through them. In the case of the cable-modem service, the cable company is your ISP. (The down-side to a cable-modem ISP is that you can't "dial in" when you're away from home.) Either way, you still need an ISP because you will need DNS service mentioned in the previous section. Be sure to verify that an ISP will set up a zone record for you on their DNS servers when you are shopping around.
One point to keep in mind though is that given the "always on" nature of a DSL or cable connection you may want to invest in some sort of firewall. Firewalls can be either hardware or software. I recently saw a software package called NetMax Firewall for Linux by Cybernet (www.netmax.com) at CompUSA and the price was only $50. That's just part of the security picture though. You would also want to know what you are doing when it comes to setting permissions to files and directories.
There's no doubt that setting up your own Internet server would involve a considerable learning curve and an investment of your time. However, in addition to setting yourself up for potential cost savings, learning how to set up an Internet server would be a marketable skill that could translate into opportunities for additional income.
I've bought quite a few Linux books. I have been unable to find one that does a good job of addressing both the workstation and server aspects of Linux at a beginners level. The ones mentioned below have been helpful in setting up Linux systems to act as servers.
Free Lite Edition
on craps, blackjack,
and roulette on my
Going To Vegas! site
My Home Page
IN NO EVENT WILL KEITH PARKANSKY OR VOYAGER, INCORPORATED. BE LIABLE TO ANY PARTY (i) FOR ANY DIRECT, INDIRECT, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF PROGRAMS OR INFORMATION, AND THE LIKE), OR ANY OTHER DAMAGES ARISING IN ANY WAY OUT OF THE AVAILABILITY, USE, RELIANCE ON, OR INABILITY TO USE THE INFORMATION, METHODS, COMPUTER EXECUTABLE CODE, OR "KNOWLEDGE" PROVIDED ON OR THROUGH THIS DOCUMENT, EVEN IF KEITH PARKANSKY OR VOYAGER, INCORPORATED SHALL HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND REGARDLESS OF THE FORM OF ACTION, WHETHER IN CONTRACT, TORT, OR OTHERWISE; OR (ii) FOR ANY CLAIM ATTRIBUTABLE TO ERRORS, OMISSIONS, OR OTHER INACCURACIES IN, OR DESTRUCTIVE PROPERTIES OF ANY INFORMATION, METHODS, COMPUTER EXECUTABLE CODE, OR "KNOWLEDGE" PROVIDED ON OR THROUGH THIS DOCUMENT.