Linux Network Installmania-- A Tutorial and Demonstration by Andrew C. Bertola This article is derived from a tutorial initially presented at the 1999 HP World Conference in San Francisco. Its aim is to teach the techniques required for installing Linux on a desktop computer in an office networking environment. Additionally, it should dispel the myths that Linux is difficult to install and that it is not suitable for office desktops. The objective is to take six bare computers, install Linux on them, configure them for networking, and then test them by writing e-mail back and forth, browsing the Web, and creating some documents and spreadsheets. Except for machine names and IP addresses, the setups for each system on the network will be uniform (see Figure 1). This is going against the grain of Linux to some extent, as most of the software promotes individuality by being endlessly configurable. NOTE: The use of Red Hat's Linux distribution is not meant to be an endorsement of its product over any other distribution. It is the distribution that I have had the most exposure to and therefore the one I am most comfortable installing. * The Installation Procedure Setting up the BIOS Insert Red Hat CD #1 into the drive. Power on the computer and enter the BIOS setup screen. Go into the BIOS Features Setup screen and set the Boot Sequence for "CDROM,C,A." Escape out to the main menu, save the configuration, and allow the machine to reboot. Starting the Kickstart Install The installation should begin with a "Welcome" screen that offers some installation method options. The kickstart installation method requires a configuration file, ks.cfg. Our file will be provided on a floppy disk. (This file can be obtained off the Web and saved to a floppy. It is available at http://drewb.com/ks.cfg.) Make sure the floppy is installed and type: linux ks=floppy and hit the ENTER key. (Tip: There is a one-minute timeout from the time the welcome screen appears to when the default install method (manual install) will automatically begin. During this time the install command above may be entered. If the default install procedure starts, reboot the machine and wait for the welcome screen to reappear.) The kickstart installation will start. All information needed by the install process should be provided by the kickstart configuration file, ks.cfg, located on the floppy. See the sidebar for a sample ks.cfg file with comments. Once the installation is complete, remove the floppy and CD-ROM, and reboot the machine. We will need to configure the BIOS boot sequence parameter back to the "C,CDROM,A" setting and save it. The system should now boot Linux! NOTE: As with many distributions of Linux, Red Hat installs with many services turned on by default. This may create a security threat. It is recommended that anyone needing to secure a Linux Network turn off any unused services. See the Resources section below for further reading. Setting Up a User Account Because the privileges of the root user are so high, it is possible to damage a Linux system irreparably when logged in as root. For instance, if root issues the command (don't try this) [root@idiotic root]# rm -rf / every (mounted and writable) file on the system will be deleted. (This is also a good reason not to share the root password.) Therefore, the first thing anyone installing Linux should do is to create a user account. To add a new user, we will use linuxconf. (You must be logged in as root to use this program.) Select "User accounts" from the list on the left. Then click the "Add" button. A form will be displayed. Fill in the "Login name" field with a nickname you would like to be known by. Fill in "Full name" with your real name. For "Group" enter the login name again. For "Home directory" enter /home/. All other fields can be left unchanged. Press the "Accept" button and you will be prompted for a password. Type in the password, and hit ENTER. You will be prompted to retype the password to confirm it. When that is done, you can leave linuxconf open and go on to the next section. Setting Up NFS We will now use linuxconf to set up a shared directory. Select "Exported File Systems (NFS)" from the left hand column. Click the "Add" button. A form will open allowing you to enter the export information. For "Path to export" enter /home//share. Leave "Comment" blank. In "Client name(s)," enter the names of all the machines on the network, separated by commas. Activate the "May Write" check box by clicking on it (it will darken). This will give all "clients" listed read/write capability on the /home//share directory. Click "Accept." Click "Quit" in the lower left corner of the linuxconf window. You will now be able to activate the changes by clicking on "Activate Changes." At this point, we can log off as root, and log in as the user we created. Once we have done this, we can create the /home//share directory using either the command line or a file manager (the graphical file manager is gmc). Go to your home directory and then use the "File->New->Directory" (or mkdir) command to create the directory share. Once this is done, use gedit (or your favorite UNIX editor) to create a small text file. Save it in the share directory you just created, and close the editor. This file can now be used by anyone with access to your share directory. To mount a share directory that you have access to on another machine, you must first create a mount point for it. This is just a directory that will hold the files. Create /home//imports. Now issue the command mount : /home//imports Now, when you look in the /home//imports directory, you should see the small text file created by the person on the other machine. Since you should have read and write privileges on the directory, you can copy that file to a local directory or you can copy a local file to that remote directory. (The privileges of the file itself may prevent you from reading or writing to it directly, though.) You can unmount the directory with the command umount /home//imports Applications for the Office There are some very good office applications ready to run under Linux. Among these are Corel's Word Perfect (free for personal use and soon to be an entire suite) and Star Office, a complete office suite that is almost fully compatible with, and looks a lot like, MS Office. An open source office suite, Abi, is in the making, with Abi Word currently available and free for download. Most Linux distributions include these apps on CD. There are some applications that come with our abbreviated installation. These include Netscape Communicator for Web browsing and e-mail, the gnumeric spread sheet, and many others. Try opening these apps by typing their name in a terminal: * netscape gnumeric gedit (a text editor) gnomecal (a datebook app) * gnomecard (a contact organizer) Again, there are plenty of fully functional packages available. Where to Get Help (Linux Resources) The list of Linux resources on the Internet is endless. It is, undoubtedly, the best place to find any information you may need. One good starting place is the Linux Documentation Project at http://metalab.unc.edu/LDP/. Here you will find FAQs, Guides, man Pages, HOWTOs, a Linux search engine, Linux links, and the Linux Gazette. Most of the information for setting up just about anything in Linux (e.g., firewalls, ppp connections, Samba, even Kickstart) can be found in the HOWTOs. There are also mailing list archives on the Web. A good one is Deja News at http://www.deja.com/. Here, you can search the Linux mailing list and newsgroup archives for any information you may need. If you've got a question about hardware compatibility or software configuration, chances are someone else has already asked it. When that fails, try signing up to a local LUG's (Linux User Group) mailing list or pop on to a newsgroup such as comp.os.linux.hardware. (Netiquette Tip: Be sure to scour the FAQs, HOWTOs, and archives before asking a question on a newsgroup or mailing list.) LUGs have much more to offer than just a mailing list. They hold meetings and many host installfests. But the mailing lists are at the center of all the other activities. On these lists you can post questions, provide answers, read announcements about upcoming events, bicker about your favorite Linux "distro," and bash other operating systems. A search for "linux user groups" on Yahoo! brings up an endless list of LUGs. If you can't find one in your area, check out http://www.svlug.org/. They are open for anyone in or out of Silicon Valley. Finally, there are good old hard copy books. Check out the shelves at your local computer bookstore, or go to one of the online bookstores. The number of Linux titles has exploded in the last two years. Unfortunately, with the rapid rate that open source software advances, you may not find a recent enough edition. If you just want to cover the basics, or want to brush up on less recent developments, there is bound to be a good book for you. About This Article This article, as stated in the introduction, is based on a presentation for the August, 1999 HP World Conference in San Francisco, California. It is the work of Drew Bertola (drew@drewb.com), a Hewlett-Packard staff contractor (Non-HP) for the Instrument Controls and Life Safety Group at HP--San Jose. It is intended both as a tutorial and as a demonstration. This work is not intended to be highly technical, but, by its hands-on nature, it will hopefully be a bit of fun. Without the help of many people, I would not have been able to do this work. Among them, I would like to thank Alexandre Petit-Bianco, who got me started with Linux. Thanks go to my HP manager, Eric Dugdale, for giving me the necessary latitude to pursue topics of questionable relevance to our day-to-day tasks. Thanks are also due to Orly Larson of HP, Pearl Pereira of Interex, and the Silicon Valley Linux Users Group, the "largest LUG in the world." Copyright Information This work, Linux Network Installmania--A Tutorial and Demonstration, is copyright 1999 by Andrew C. Bertola. While every precaution has been taken in the preparation of this work, neither the author nor the publisher assumes any responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. Linux Network Installmania--A Tutorial and Demonstration may be reproduced and distributed in whole or in part, in any medium, physical or electronic, so long as this copyright notice remains intact and unchanged on all copies. Commercial redistribution is permitted and encouraged, but you may not redistribute it, in whole or in part, under terms more restrictive than those under which you received it. Andrew C. Bertola is a Hewlett-Packard staff contractor (non-HP) for HP's Instrument Controls and Life Safety Group in San Jose, Calif.