Linux System Administration Guide

by Samar Abbas (Version 1.0, 22/3/2003)

  1. Installation (a. Stdd. Install, b. Troubleshooting, c. Partitions, d. Customiz'n or Post-Install Config, e. Other Install Methods: KickStart, Multi-Boot OS f. Rescue)
  2. Pkg.Mgt. (a. RPM, b. Debian P.M., c. Shared Libs, d. Sample installations, e. Compression, Backup and Storage) {LPI-102}
  3. Hardware Admin (a. Device admin., b. Sound+Video, c. Printer, d. Modems, e. Storage Media: Floppy, CD, f. Installation of New Hardware) {LPI-102}
  4. User Admin. (Users and Passwords, Groups, Quotas) {LPI-101}
  5. System Accounting (a.Logging: syslogd, load monitors, sniffers, b.Process Management)
  6. Kernel (a. Kernel Modules, b. Boot Process: Boot mgrs: LILO, windows bt mgr, c.Init. and Shutdown: run-levels d. Installation and Rebuilding) {LPI-102}
  7. Security (System Security: tcp_wrappers, ssh, PAM, Encryption, tools: TripWire; Network Security: Proxy (squid), Firewall (ipchains), Router)

I. Installation

a. Standard Installation

  1. Boot from CD : Boot from install CD, hitting <DEL> to make it default 1st/2nd/3rd bootg dev.
  2. Partitioning : Use fdisk or Disk Druid. Optionally mount dos partition as /dosc in Disk Druid.

b. Installation and Post-Installation Problems

c. Partitions

Swap Partitions
Definition of Swap : - Generic term for disk storage used to increase the amount of apparent memory available on the system. [welsh.185];
ie. data (ie. memory pages; 1page = 4096b) is written to swap when there is not enough RAM; although disk access is slower than RAM acess.

d. System Customisation (Post-Install)

e. Other Install Methods (Kickstart, etc.)

f. Rescue + Debug

sync, umount used in rescue mode since halt|reboot|shutdown not operate properly.

II. Package Management

a. RPM

b. Debian

c. Shared Libraries

Statically Linked Executables: "complete", contain all functions required for execution; good for low-level maintenance tasks Shared Libraries : - a core set of routines

d. Sample Installs

e. Compression, Backup, and Storage (Using Removable Media)

Incremental Backup : - A procedure for Backing Up only the Files that you have changed or added since doing your last Backup.

Differential Backup : - A procedure for Backing Up only files that have been changed or added since the last full backup. [xrefer.com]


III. Hardware Administration (Device Admin.)

a. Hard Drive Admin

IDE (Integrated Drive Electronics): - A standard electronic interface used between a computer motherboard's data paths or bus and the computer's disk storage devices. [whatis.com]

SCSI (Small Computer System Interface) : - Set of evolving ANSI standard electronic interfaces that allow personal computers to communicate with peripheral hardware such as disk drives, tape drives, CD-ROM drives, printers, and scanners faster and more flexibly than previous interfaces; Developed at Apple Computer. [whatis.com]

Definition of Block Device : - Data read and written to the device (usu.a peripheral, eg. HD) as entire blocks of device-determined size (usu.512b-32kB); denoted by `b' in first col. & canbe randomly accessed. eg:
brw--rw----- 1 root disk 3, 0 May 19 1984 /dev/hda
(3, 0 are major device nos: a particular driver in the kernel; Minor device no. represents a particular device handled by that driver)

Definition of Character Device : - read/written sequentially 1 byte (ie. char.) at a time in order (eg. modem, serial port); usu. denoted by `c'.

b. Sound+Video Cards

c. Printer Admin.

d. Modems : SLIP & PPP

PPP (Point-to-Point Protocol: - A communication protocol

IV. User Administration

a. Users and Passwords

b. Groups

c. User Quotas


V. System Accounting

a. Logging

b. Process Management


VI. Kernel Admin

a. Kernel Modules

Kernel : Abstraction layer interface between raw HW and appl. programs; the "heart of linux" [devWorks.102.II]

Monolithic Kernel : support for all HW, NW protocols & FS built within single file

Modular Kernel : kernel loads required modules (drivers built as object files) dynamically; saves RAM Definition of Module : - A Loadable Device Driver, ie. added to or removed from memory at run-time, a single object containing all of the code for the driver, eg. /boot/*.o [welsh.170]

b. Boot Managers: LILO etc.

Definition of Boot Loader : - A small program located in boot sector to allow user to choose an OS to boot into [certifyexpress.com]

c. Initialization and Shutdown (Boot Process)

d. Kernel Building

  1. make clean: deletes results of previous builds = make mrproper: mrproper target def'd in Makefile which restores sources to clean state
  2. [/usr/src/linux]~$ make mrproper
  3. [/usr/src/linux]~$ cp -p configs/kernel-i386.config arch/i386/defconfig
  4. make oldconfig : recover default kernel config
  5. make xconfig: X-based GUI (best) | make menuconfig: GUI | make config: interactive cmd-line oriented kernel build
  6. make menuconfig: y | n | m (module) | <> deselected | <*> tobe compiled into kernel img | <M> tobe compiled as module (for sections cf. run)
  7. /usr/src/linux/Makefile: EXTRAVERSION = -16sam
  8. make dep: generate dependancy info, create kernel depenancies + propagate top-level configs to subdirs
  9. make bzImage : compile the bin.kernel img; creates /usr/src/linux/arch/i386/boot/bzImage and /usr/src/linux/System.map
  10. make modules : %make modules && make modules_install : compile & install modules from /usr/src/linux/modules to /usr/lib/2.2-16/
  11. cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.16-22sam : copy compressed kernel
  12. cp /usr/src/linux/System.map /boot/System.map-2.2.16-22sam
  13. make modules_install
  14. mkinitrd /boot/initrd-2.2.16-22sam.img 2.2.16-22sam : create RAM disk image
  15. /etc/lilo.conf: 2 new lines "image=/vmlinuz2" & "label=newlinux" added, run %lilo -v -v


VII. Security

a. PAM


References