Unformatted text preview:

CS302 SUPPLEMENTUNIX SYSTEM ADMINISTRATIONDavid J. Powers12-May-042nd Edition © 2004Table of Contents1.0 Linux Installation (Redhat V9.0)1.1 Image or Filesystem 11.2 Image or Filesystem 22.0 The Command Line and Shells2.1 Introduction2.2 Commands2.3 Special Variables2.4 Special Keys2.5 Special Files2.6 Redirection2.7 Pipes2.8 Shell Metacharacters2.9 Resources3.0 Processes3.1 Terminal Processes3.1.1 Starting a Process3.1.2 Ending a Process3.1.3 Process and Job Control Commands3.2 Boot & Init Process3.2.1 Boot Process3.2.2 Important Boot Files3.2.3 Init Process3.2.4 List of Startup Scripts4.0 Files and Devices4.1 File System Table4.2 File System Hierarchy4.3 File Search Paths4.4 Device Files4.5 File Attributes4.5.1 File Entry4.5.2 File Permissions4.5.3 File Types4.6 Commands4.6.1 File System Commands4.6.2 File Directory Commands4.6.3 File Commands5.0 User Accounts5.1 Commands5.2 Special Files5.3 Adding a User Manually6.0 Editors (pico, emacs, vi)6.1 pico- 2 -Table of Contents (continued)7.0 Time Scheduled Commands7.1 at command7.2 cron daemon7.2.1 General Information7.2.2 Commands7.2.3 User cron file7.3 Command output7.4 Uses for cron and at8.0 FTP – File Transfer Protocol8.1 General Information8.2 Logging On8.3 Commands8.4 Logging Off9.0 Web Server (Apache)9.1 General Information9.2 Log Files9.3 Resources10.0 Mail Server (Sendmail)10.1 General Information10.2 Sending Mail10.3 Receiving Mail11.0 NFS – Network File Ssystem11.1 General Information11.2 Setting up a Network11.3 Setting up an NFS Server11.4 Setting up an NFS Client11.5 Commands11.6 Special Files12.0 X11 - X Window Server12.1 General Information12.2 vnc Remote Desktop12.3 Commands12.4 Exporting your Display13.0 Samba13.1 General Information13.2 Commands13.3 Setting up a Samba Connection14.0 Printing14.1 General Information14.2 Commands14.3 Installation14.3.1 System Settings -- Printing14.3.2 Web- 3 -Table of Contents (continued)15.0 Scripting15.1 General Information15.2 Shell Programming in Bash15.3 Sample Scripts16.0 Installing Software Packages16.1 Installing Software Packages16.2 Adding/Removing Standard Redhat Applications16.3 Resources17.0 Linux Resources17.1 MAN pages17.2 Web pages18.0 Rebuild Linux KernelAPPENDIXA Utility CommandsB Secure Shell (ssh) and PuttyC Summary of Network ServicesGlossary- 4 -1.0 Linux Installation (Redhat 9.0) 1.1 Image or Filesystem 1 Steps:1. Boot from Redhat 9.0 CD-ROM (you may have to change BIOS Setup)2. Use the following options:● press <Enter> to install in graphical mode● Skip Media Check for CD-ROM● Select appropriate language, keyboard and mouse (for example, 2 Button PS/2 Mouse)● Perform a New Redhat Linux Installation● Select Workstation● Manually Partition Disk into 3 partitions: Delete all old partitions and then add (New) the following partitions:Partition Mount Point Type Format Size/dev/hda1 / ext3 √ 8000/dev/hda2 /user2 ext3 √ 8000/dev/hda3 <none> swap √ 800 ● Select Next to use Grub Boot Loader● Use DHCP for networking● Select No Firewall● Set your root password ( you must remember this! )● Make a boot disk (floppy disk)● Configure monitor and video card (take defaults)● Select Exit and the system will reboot3. After the system reboots:● Create a user account● Set the date and time● Test the sound card and speakers● Answer no to "Register System"● Answer no to "Additional CD's"- 5 -1.0 Linux Installation (continued) 1.2 Image or Filesystem 2 Steps:1. Boot from Redhat 9.0 CD-ROM (you may have to change BIOS Setup)2. Use the following options:● press <Enter> to install in graphical mode● Skip Media Check for CD-ROM● Select appropriate language, keyboard and mouse (for example, 2 Button PS/2 Mouse)● Perform a New Redhat Linux Installation● Select Workstation● Manually Partition Disk and change /dev/hda2 from /user2 to /, select Continue in warning popup, and answer Yes to format (for swap and /dev/hda2). Use the Add and Edit options to set your partitions as follows: default √ imagename1 /dev/hda1 (Add) imagename2 /dev/hda2 (Edit)● Select Next to use Grub Boot Loader● Use DHCP for networking● Select No Firewall● Set your root password ( you must remember this! )● Make a boot disk (floppy disk)● Configure monitor and video card (take defaults)● Select Exit and the system will reboot3. After the system reboots (select imagename2) :● Create a user account● Set the date and time● Test the sound card and speakers● Answer no to "Register System"● Answer no to "Additional CD's"- 6 -1.0 Linux Installation (continued) 1.2 Image or Filesystem 24. Edit the following files:● /boot/grub/grub.conf (Image 2)default=1timeout=10splashimage=(hd0,1)/boot/grub/splash.xpm.gztitle imagename2 root (hd0,1) kernel /boot/vmlinuz-version ro root=/dev/hda2 initrd /boot/initrd-version.imgtitle imagename1 root (hd0,0) kernel /boot/vmlinuz-version ro root=/dev/hda1 initrd /boot/initrd-version.img● /etc/fstab (Image 2) change lines with "LABEL=/" to /dev/hda2 as appropriate● /etc/fstab (Image 1) $mkdir /image1 $mount /dev/hda1 /image1 $cd /image1/etc <edit fstab> change lines with "LABEL=/..." to /dev/hda1 or /dev/hda2 as appropriate- 7 -2.0 The Command Line and Shells 2.1 Introduction When you type a command and press Enter, the command is interpreted by your shell program. Every valid command is either a shell built-in or an external program or script file. Most external commands are located in /bin or /sbin directories. Your default shell is 'bash', the Bourne Again Shell. You can replace Bash by another shell program if you want. Linux shells are case sensitive. Commands must be entered in the proper case. 2.2 Commands $alias blah='command' make new commands for the session$alias lm='ls -l m*' command lists all files that begin with m$chsh –l list all available shells (from /etc/shells)$chsh –s newshell change shell (updates /etc/passwd)$echo $sh_var display value of a shell variable$exec newshell exits current shell, runs newshell$exec command exit current shell or script and run newcommand$exit


View Full Document

NMU CS 302 - The Book

Documents in this Course
Load more
Download The Book
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The Book and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The Book 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?