Session 35 25 Reasons to Consider Linux Jeremiah Curtis Nat Foley Darren Rhoads.

37
Session 35 25 Reasons to Consider Linux Jeremiah Curtis Nat Foley Darren Rhoads

Transcript of Session 35 25 Reasons to Consider Linux Jeremiah Curtis Nat Foley Darren Rhoads.

Session 3525 Reasons to Consider

Linux

Jeremiah CurtisNat Foley

Darren Rhoads

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

1. What is Linux?2. Supported OS

versions3. Why NxTrend &

Linux4. Database servers

vs Client Desktop

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

5. GRUB

6. Run Levels

7. Controlling Services

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

8. Setup

9. /etc/fstab

10. RAID

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

11. Backups/Restore12. Bare Metal Recovery13. Software

Management with RPM

14. User Admin15. Printer Admin16. Cron17. /proc file system18. Kernel tuning

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

19. Sar / iostat

20. vmstat

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

21. Email

22. Samba / NFS

23. Client Communication Protocols

25 ‘points of light’

• Overview• Boot• Filesystem• System Admin• Performance• Networking• SX Specific

24. vid printing

25. report manager script

Overview: What is Linux? 1/25

• Linux – rhymes with ‘cynics’ • Open-source ‘unix’ – Linus Torvalds – ’91• World-wide developers – plug-in packages• Distributions – collections of packages

• Red Hat, SuSE, Turbolinux, Mandrake• Open-source = fast fixes to vulnerabilities• ‘free OS’ = ‘free speech’, and ‘free beer’• Software = depends on license• Support = not free

Overview: Supported OS Versions 2/25

• What NxTrend plans to support:– Red Hat Enterprise Linux 2.1 (AS)

– Red Hat Enterprise Linux 3.0 (AS) – future• Progress OpenEdge 10 service pack 1• Possibly Progress 9.1D09, 9.1E, summer 04?

Overview: Why NxTrend & Linux

3/25

• Low cost of ownership for customer base

• Added platform for flexibility

• NxTrend Corporate knowledge of unix

• Progress qualified/supported

DB Server vs Client Desktop

4/25

• NxTrend only supporting Linux as a Database server

• Not ‘Windows replacement” for client desktop

Boot: GRUB 5/25

• GRand Unified Bootloader• Select which Operating System for

multi-boot system• Select which Linux kernel to boot for

testing different kernels• Select which boot level for system

maintenance / repair• Change root password

Boot: Run Levels6/25

• 0 – Halt• 1, S, emergency – Single-user modes• 2 – multi-user, without NFS• 3 – Full multi-user• 4 – user-definable• 5 – Full multi-user with X11• 6 - Reboot

Boot: Controlling Services7/25

• ftp, telnet, http, cron, samba, and so on

• service – changes ‘now’– Start, stop, restart, status

• chkconfig – changes ‘future’– List, add, delete, turn on/off for boot

scripts

Filesystem: Setup8/25

• Disk Druid – Easiest way to set up file systems– Only available during installation

• fdisk

– Create partitions (FAT32, AIX, etc)

• Journaled File system– mke2fs – create file system with –j option– tune2fs – change to journaled with –j option

Filesystem: /etc/fstab9/25

/dev/sdc1 /rd ext3 defaults 1 2 /dev/sdc2 /db ext3 defaults 1 2 /dev/sdd1 /dump ext3 defaults 1 2 /dev/sdd2 /sort ext3 defaults 1 2

DEVICE

MOUNT_POINT

FS_TYPE

OPTIONS

DUMP_FREQ

FSCK_ORDER

•Set dump_freq and fsck_order to 0 for remote mount file systems, swap, cd-rom, floppy

Filesystem: RAID10/25

• Redundant Array of Inexpensive Disks– RAID 0: Striping– RAID 1: Mirroring– RAID 1+0: Striped FS on Mirrored disk sets– RAID 0+1: Mirrored FS on striped volume sets– RAID 5: Array with parity bit (never

recommended)• Hardware RAID highly recommended• Software RAID possible in RH Linux

– Only recommend RAID 0, 1, or 1+0 cat /proc/mdstat to see software RAID status

Sys Admin: Backup/Restore11/25

• cpio backups still standard– Must change the cpio options in scripts– Must change the tape device name in

scripts

• Exploring ‘pax’

Sys Admin: System Recovery

12/25• Recommend “Mondo”

– Bootable .iso image– Burn to CD or DVD – Boot to base OS from CD or DVD– Use to resize root file systems (/, /var,

/usr)

• Recovery diskette– Minimal bootable kernel and drivers

Sys Admin: Software Mgmt13/25

• RPM – Red Hat Package Manager– RPMs – distribution method for packages– Database of packages– Install, uninstall, update, verify, query

packages

Sys Admin: User Admin14/25

• useradd/userdel command• Each user has a private group ID

assigned• Group permissions meaningful - granular• /etc/skel – skeleton for new users’

$HOME• /etc/profile -> /etc/profile.d ->

/etc/bashrc -> ~/.bashrc -> ~/.bash_profile

Sys Admin: Printer Admin15/25

• LPRng – Available in RHEL 2.1– Updated BSD lpr print spooler

• CUPS – Common UNIX Printing System– Available in RHEL 3.0– Print spooler of choice for Red Hat– Will likely become NxTrend print spool

standard

Sys Admin: cron16/25

• Use common ‘cron/crontab’ commands– crontab –e to edit– crontab –l to list– crontab –r to remove (you didn’t see this!!)

• Can use specific crontab files for cyclic processes– /etc/cron.hourly, /etc/cron.daily,

/etc/cron.weekly, /etc/cron.monthly

Sys Admin: /proc file system17/25

• Virtual file system containing info about the kernel currently in use

• View files with ‘cat’ or ‘less’ or ‘more’

• DANGER - can modify certain settings on the fly

Sys Admin: Kernel Tuning18/25

• sysctl – configure kernel parameters– Display current settings (-a option = all)– Change settings at run-time (-w option)– No reboot necessary– Changeable parameters in /proc/sys– Change settings for future boots

• /etc/sysctl.conf is the config file

Performance: sar /iostat19/25

• Must install sysstat package• sarLinux 2.4.9-e.38smp (orthanc) 04/28/200403:56:36 PM CPU %user %nice %system %idle 03:56:42 PM all 0.25 0.00 0.79 98.96 03:56:48 PM all 0.42 0.00 1.12 98.46 03:56:54 PM all 0.71 0.00 0.79 98.5003:57:00 PM all 0.12 0.00 0.62 99.25 03:57:06 PM all 0.12 0.00 0.62 99.25 Average: all 0.32 0.00 0.79 98.88

• Cool options• -U ALL (show breakdown by CPU)• -o and –f (record/retrieve from file rather than

screen)

Performance: sar /iostat19/25 (cont)

• Must install sysstat package• iostatavg-cpu: %user %nice %sys %idle 4.79 0.00 2.29 92.92

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtndev8-0 6.83 0.00 216.00 0 1296dev8-1 7.33 1.33 118.67 8 712dev8-2 0.00 0.00 0.00 0 0dev8-3 11.50 198.67 96.00 1192 576dev8-4 0.00 0.00 0.00 0 0

• Cool options• -x (display by partition)• -t (record the time-stamp or each iteration)

Performance: vmstat20/25

• Must install procps package (standard)• No special permissions necessary• Doesn’t count itself against numbers

[root@orthanc root]# vmstat 6 5 procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 0 0 0 92 263928 282540 2907720 0 0 0 0 0 0 0 0 2 0 0 0 92 263928 282544 2907768 0 0 8 12 131 554 0 0 100 0 0 0 92 263928 282544 2907768 0 0 0 21 138 581 0 0 100 0 0 0 92 263928 282544 2907768 0 0 0 40 153 652 0 0 100 0 0 0 92 263928 282548 2907784 0 0 3 54 156 629 0 0 99

Networking: Email21/25

• MTA – Mail Transport Agent– sendmail

• MDA – Mail Delivery Agent– sendmail

• MUA – Mail User Agent

Networking: SAMBA / NFS22/25

• SAMBA– Windows: Standard drive/printer sharing

look/feel– Unix: Can mount shared Windows drive as a

file system• NFS

– Unix: Better protocol for Unix remote file system sharing

– Windows: Need the MS “Services for Unix” (SFU) installed on Windows machines

• Both– share one directory with NFS & SAMBA for all

computers

Networking: Client Communication Protocols

23/25

• SSH – Secure Shell– Encryption for data security

• FTP – File Transfer Protocol– Must be activated for install/upgrade

process

• Telnet – Terminal networking access– Must be activated if using telnet protocol

for character client software, i.e. InVue

SX Specifics: vid printing24/25

• Used to use ‘pg’ – not standard in RH

• Rewritten to use ‘less’ command

• Allows for in-stream decompression of gzip’d text files for viewing old logs

SX Specifics: report manager

25/25• Modify rptmgr startup script to use a

‘standard’ executable, rather than a ‘non-standard’ one

Additional Information

www.nxtrend.com– Customer care – matrix of which

Applications NxTrend has qualified and is supporting

– Future webinars on strategic Linux partnerships

www.redhat.com www.ibm.com/linux

Questions?