Company Consulting Home Software Technical Writing Web Design and Hosting
 

Garv's Red Hat 5.2 Custom Install Guidelines

Garv Austin March 16, 1999. garv@ns.net

Please be advised this is a new document; you may be the first to us it. Please let me know of errors, omissions and successes right away. Thanks.

Using terms I borrowed from other Linux-related documents, this Guide is copylefted. Please distribute freely, but please leave it intact.

The idea of doing a Custom Install is to get necessary files (and a few extras) loaded where you may have limited disk space or just don't feel the need for the Turkish language HOWTOs. Also, the Server or Network install may re-partition your hard drive and erase any current files, while the This Custom install lets you choose, and runs only about 300MB.

Get CD up and recognized w/boot diskette.

There are various ways to boot and partition your drive(s). You need a minimum of two partitions for Linux, one native and one swap (type 82 & 83). The swap partition can be as large as 127MB, but if you're a bit cramped for space, it worked fine for me with 16MB. I also like to have a /home partition. (50MB worked fine when I was using a 420MB drive). And you can save your /home partition and personal files if you have to re-install Linux. (I've had a lot of experience with this).

The rest of this guide assumes you have finished partitioning and are ready to go with the Custom Installation.

Also please note that you do NOT need to download pdksh, the public domain Korn shell, as it is on the RH 5.1/5.2 cd and easy to install. I hope we are going with RH 5.2, but 5.1 will do. (5.2 is available from cheapbytes and others for about $2.00, and there is generally a RH Installation manual on the cd).

The ZDU manual instructs you to edit (system) files. Some of it is not necessary, and it could be dangerous. If you do edit these files, make backups (copies) first.

For example, if you were going to edit the /etc/passwd file, log in as root and type in:

cd /etc cp passwd passwd.cpy (or whatever)

The cd installs ksh to a different directory than the Intro to Unix shows, but we'll get to that. Also, ksh is not Launch Critical. It's not the first thing you need to do; get a bit more comfortable with the system first. When you do load and use the Korn shell, I recommend you assign ksh to a fictitious user and login as that user when doing course material. The rest of Linux is very happy with (and defaults to) the bash shell.

Okay; now that we're really confused, let's try a custom install.

Select Custom

Partitioning is assumed complete.

I select these Packages and I'm online using Netscape 4.0x for Linux.

Printer Support X Window System DOS/Windows Connectivity File Managers X Multimedia Console Multimedia Dialup Workstation Emacs Emacs with X windows C Development (Compiling) Development Libraries C++ Development (Compiling) Ok (257 MB total.) Mouse psaux (ps/2 DOS) (I now put mouse: ps2, irq11; modem: com2, irq3). Matrox Mystique Video id Custom Monitor (Info from Mfr may be needed) Need Refresh, sync info; OVERWANKING CAN DAMAGE MONITOR! I select my own resolution from options rather than default. Time zone Startup at boot options Ok. Printer? HP Deskjet Plus Boot in MBR. Yes for me.

Password for root (superuser)

I believe the system reboots here, I hope properly. If it stalls on gpm services, jiggle the mouse.

Adduser (self) Passwd self (Does the book omit this important step?)

Adduser for ksh. This is for the fictitious user I recommended above. I am using kshuser as example. Passwd kshuser

You might logout and back in as each user, just to see how things work.

If you are coming to Linux/Unix from Win95/98 and are not yet familiar with the command line, you'll be glad to know that the ksh shell can also be easily installed from the graphical interface, using Glint in the X Window system. But we can get to that later; there no great need to rush to ksh.

I might add another note here; Linux/Unix is generally very command-line oriented. A little background in DOS and/or BASIC will be very helpful.

Now let's load ksh using one of the easier methods.

Login as root (superuser is common term).

Mount the cdrom by typing:

mount /mnt/cdrom

You should hear the cd spin up.

Change to the cdrom directory by typing:

cd /mnt/cdrom

Type:

ls (listing)

You should see a listing of directories on the cd; we want RedHat. (Unlike DOS, Linux/Unix is case-sensitive; R is not the same as r).

Type in:

cd Re

Let's stop for a quick bash tip and a great time-saver for error-prone typists like myself. I use this one so much, I forget to mention its utility. When you type:

cd Re

you can hit the [Tab] key and the RedHat will be completed for you. This (command line completion) will be very useful in just a minute. You should see a new listing of (sub)directories. We want RPMS.

Type in:

cd RP and hit [Tab] (The RPMS should be completed for you).

When you hit [Ent], you will move to the RPMS directory.

Now if you type in:

ls

you may need to be a very fast reader as the names of files fly by. If you type in:

ls | less

you can look at the file names one screen at a time, and scroll back up if you like. In alphabetical order, you'll see pdksh - followed by a bunch-of-stuff-I-don't-know - .rpm. Luckily, we don't have to accurately type in that whole filename as we can use command line completion. To install pdksh, just type in:

rpm -I pdk

then hit the [Tab] key. It will complete the file name. When you hit the [Ent] key, ksh should be properly installed.

To verify installation, type in:

whereis ksh

You should see something like:

/bin/ksh /usr/bin/ksh (this is a link, but no concern for now).

There may be one or two more listings; they are probably man (manual) entries. We'll talk about those at a later time.

Now we want to assign the Korn shell to (at least) one of the users. Again, let's do it the easy way, rather than try to edit the /etc/passwd file.

Logged in as root type in:

chsh -s /bin/ksh kshuser

You should get verification that the shell has been changed.

Now, if you logout and back in as ksh user, you will see a strange prompt. We'll take care of that in a minute.

This is another place the ZDU manual instructs you to edit a system file, /etc/profile (on page 59). The idea behind the editing is to tell ksh to show the Present Working (PWD) properly. The manual doesn't warn you to make a copy of this file before editing, is not clear on how to edit, and gives the incorrect path (if you install from the cd). And you can get nasty results if this file is edited incorrectly.

So, let's see if we can accomplish the same task without editing a system file. By Jove, I think we've found it.

Logged in as kshuser (or root, as long as you're in the /home/kshuser directory) type in:

ls

You probably see no directories or files listed. However, if you type in:

ls -a

you will see several files preceded by a . (dot). These are "hidden" files, but those we see are used mostly by bash, so we need a new one, a .profile, that will be the first file ksh will read when you login. (And if we do mess it up, we only need to correct a problem for a single user, and not the whole system), and we need the .profile to tell ksh to change that strange prompt to something we can understand, the Present Working Directory (PWD).

Type in:

vi .profile

You will be advised this is a newly created file. If the system complains, logout and back in as root, but cd to the /home/kshuser directory.

In vi, hit the "I" (INSERT in bold should show in lower left corner).

Type in:

export ENV=$HOME/.profile EDITOR=emacs

PS1='$PWD> '

Hit the [Esc] key (May hear a beep). Hit the : [Colon] key.

Type in:

wqa! (at the colon)

When you hit [Ent], the new .profile should be written and saved. You still have the strange prompt. Logout and back in. Viola! (No, just vi). You should now be logged in as /home/kshuser (name you chose) and in the current or present working directory. This .profile is an important file; as we move along, we'll have to add new instructions to extend its power. And soon I believe we'll be able to use an even easier and more complete method to do this same task. (Maybe next week?)

Stay tuned for the next exciting episode of "The ksh of Death."

If I made any glaring or bonehead errors, please let me know.

March 16, 1999

garv@ns.net

[Return to Linux Page]