ebook img

Unix from new user to technical expert - IBM's AIS on RS/6000's PDF

372 Pages·2016·5.9 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Unix from new user to technical expert - IBM's AIS on RS/6000's

(cid:0) (cid:1) (cid:2) (cid:3) (cid:4) (cid:5) (cid:6) (cid:7) (cid:8) (cid:1) (cid:9) (cid:10) (cid:0) (cid:11) (cid:9) (cid:6) (cid:12) (cid:7) (cid:13) (cid:14) (cid:15) (cid:16) (cid:17) (cid:18) (cid:15) (cid:19) (cid:20) (cid:21) (cid:22) (cid:23) (cid:14) (cid:24) (cid:25) (cid:26) (cid:27) (cid:28) (cid:29) (cid:30) (cid:31) (cid:26) ! " # $ % & ’ ’ ’ (cid:29) (cid:30) Stewart Watkiss Copyright Message All rights to this document are retained by the author Stewart Watkiss. The document is made freely available over the Internet and may be printed for personal use or to pass on to a friend, colleague or family member provided that this copyright message is included in the document. The document however cannot be sold for profit, whether as an computer file, printed document or any other form without the express written permission of the author. No part of the document may be copied or included into other works without the express written permission of the author. Whilst I do not expressly forbid the electronic distribution of this document it is discouraged. Instead please direct them to the web page at http://watkiss.members.easyspace.com/computers/unix/aix/aixdoc.html where the latest version is referenced. If the document is distributed in electronic format then the following rules must be observed: ( ( This message must be included as part of the document. The file must be in it’s original format without any modification (i.e. the document is ( provided in Portable Document Format and must be retained in this format). The document may not be divided or sectioned other than how it is when downloaded, the individual parts may be distributed separately however each section must have this copyright message with it. If in doubt about any of the above then you should E-mail the author for clarification. You should also E-mail the author if permission is required to go outside of the rules of these conditions. E-mail [email protected] If you do not agree with the conditions above then you should immediately destroy any copies (electronic, printed or otherwise) that you may have. ) * * / * 0 1 I hope you find the document useful. + , - . - 2 2 3 4 5 6 7 5 6 8 CP QoRpSyTriUghV tW MR eX TssQ age ..................................................... 3 ......................................................... 1 About this book ......................................................... 1 UNIX the Computers Operating System ............................... 1 More about UNIX ........................................................ 2 SF oG wH HhIyJ iKs AL IXH M dNifH fGerOent .................................................. 3 .................................................... 4 Logging Directly into a local machine ................................. 5 Logging in via the network ............................................. 7 Exiting from UNIX ....................................................... 9 Important Points for new users ....................................... 10 Shells ................................................................... 10 The Shell Prompt ......................................................... 12 Command Basics ...................................................... 13 Format of Commands ..................................................... 14 Getting Help .............................................................. 14 Finding Files and Commands (find) .................................. 19 A few useful commands ............................................... 19 Clear ..................................................................... 19 9 : ; < = > ? @ A : B < C D E B : < = Echo ..................................................................... 19 ........................................... 20 Relative Directories .................................................... 22 Special Directories ..................................................... 22 Moving about the directories (cd) ..................................... 23 Listing the contents of the directories ................................ 23 Referring to files within a directory ................................... 25 Lost + Found ........................................................... 25 Making a new directory (mkdir) ....................................... 25 Making a new file (touch) .............................................. 26 Removing a directory (rmdir / rm) .................................... 26 Removing a file (rm) ................................................... 27 Moving / Renaming a file or directory (mv) ........................... 27 Copying a file (cp) ...................................................... 27 Viewing the contents of a text file (cat) ............................... 28 Viewing the beginning / end of a text file (head / tail) ................ 28 Checking the type of file (file) ......................................... 29 Printing a file ........................................................... 29 File Structure (Inodes) ................................................. 29 File Permissions ....................................................... 30 Changing File Permissions (chmod) ....................................... 31 (cid:139) (cid:140) (cid:141) (cid:142) (cid:143) (cid:144) (cid:140) (cid:142) (cid:145) (cid:146) (cid:140) (cid:147) (cid:148) (cid:145) (cid:142) (cid:147) (cid:149) Changing the file owner (chown) .......................................... 32 (cid:132) (cid:130) (cid:127) (cid:138) (cid:130) ............................................ 33 .................................................................. 34 Root ..................................................................... 34 Querying users on the running system ............................... 35 Looking at other users ................................................. 36 Changing the Password ............................................... 37 Sw wx itychz { U| se} r~ ((cid:127)su(cid:128)) .(cid:129)..(cid:130)..} ..(cid:129)..(cid:131) ..(cid:132)..(cid:133)...(cid:134) .(cid:135) ...(cid:136) ..(cid:129) ..(cid:128) ..(cid:128)...x..{..(cid:137) ..(cid:130) ..................... 37 ................... 38 Using command switches ............................................. 38 The pipe command (|) .................................................. 39 Redirecting stdout, stdin and stderr (> <) ............................ 39 File Descriptor Table ................................................... 42 Viewing output one page at a time (more and pg) ................... 42 Extracting relevant lines (grep) ....................................... 43 Command Substitution (`backquote`) ................................ 43 Processing a list of files (xargs) ...................................... 44 Running Commands one after another (;) ............................ 44 Character Substitutions ............................................... 44 Wildcards ................................................................ 45 Inclusion Lists ............................................................ 45 Eg sch iapj ingk Sl pmeician l Co hpaq rarctlerk s (k Mes ttacu hv aracters) ...................... 45 ............................... 46 Cutting columns from tables or field (cut) ........................... 46 Sorting files (sort) ...................................................... 47 Handling duplicate lines (uniq) ........................................ 48 YEqZ u[at\ in] g eZ x\ p^ re_ ‘ssa iobns‘ c(e_x\ pZ r‘) d ..e..‘..f.................................... 48 .................................. 49 Shell Variables ......................................................... 49 Shell Defaults ........................................................... 50 History .................................................................. 53 ˝ ˛ ˇ — (cid:209) (cid:210) (cid:211) (cid:212) (cid:213) (cid:214) (cid:215) (cid:212) (cid:216) (cid:210) (cid:217) (cid:218) ˇ (cid:210) (cid:219) (cid:220) ...................................... 54 Editor Modes ........................................................... 54 Worked Example with VI ............................................... 55 Starting VI ................................................................ 55 Inserting a New Line ...................................................... 56 Moving Around the File ................................................... 56 Deleting Letters and Inserting a New Word ................................ 57 Save the Document ....................................................... 57 Replacing a Letter ........................................................ 57 Search and Replace ....................................................... 57 Save and Exit ............................................................. 58 ˙ ¨ (cid:201) ˚ ¸ (cid:204) (cid:204) ¸ (cid:204) Preferences ............................................................... 58 ........................................................... 58 Daemons ................................................................ 60 Return Codes ........................................................... 60 Controlling Processes ................................................. 61 Prioritisation ............................................................ 61 F” u» rt…h‰ e(cid:190)r (cid:190)Jo(cid:190) b ¿ an(cid:192) d` ´Prˆ o˜ ¯ce` s˜s˘ C(cid:192) o¯ ntrol ..................................... 62 .......................................... 64 Symmetrical Multiprocessing (SMP) .................................. 65 Massively-Parallel Processors (MPP) ................................. 66 S† ¤P¶ Cfi o‚ m„ „p‚ ufi t“in§ g¤ .§ ..' ..– ..†.‡ .................................................. 66 ............................................... 66 Step 1 - Booting into install mode .................................... 66 Classical RISC/6000 ....................................................... 67 PCI RISC/6000 ............................................................ 67 Step 2 - Defining the Console and Language ........................ 67 Step 3 - Installation and Maintenance ................................ 68 Step 4 Installation process ............................................ 69 Sƒ t§ep¤ 5' “ C« o‹ n› f“ig¤ u« rafi tflio(cid:176)n A– s†s‡ ist· an(cid:181) t¶ fi .(cid:176)..• .................................... 70 ................................ 70 Using X Windows ......................................................... 71 Using a text terminal ...................................................... 72 Using SMIT ............................................................. 72 A worked Example ........................................................ 74 SMIT Logging ............................................................. 81 (cid:150) (cid:151) (cid:152) (cid:153) (cid:154) (cid:155) (cid:155) (cid:156) (cid:151) (cid:157) (cid:158) (cid:159) (cid:153) (cid:160) (cid:154) ¡ ¢ £ (cid:153) ⁄ (cid:154) (cid:160) ¥ SMIT options ............................................................. 81 .................................... 82 AIX Packages and Bundles ............................................ 83 Fileset naming ............................................................ 83 Bundles .................................................................. 84 Sharing Software Components ....................................... 84 Software Updates ...................................................... 85 Obtaining Fixes (FixDist) .................................................. 85 Applying Fixes and Updates .............................................. 88 Installing Software, Upgrades and Fixes ................................... 89 (cid:231) Ł Ø Œ Ł º (cid:236) (cid:237) (cid:238) (cid:239) (cid:240) º Ł æ (cid:242) æ Œ (cid:237) Ł Viewing installed software ................................................ 93 ........................................ 93 Installing the Online Documentation ................................. 93 Vª i(cid:228)e(cid:224)w(cid:229) i(cid:230)n(cid:222)g (cid:228)t(cid:226)he Online Documentation ................................... 95 .............................................................. 96 Printing Process ....................................................... 97 Configuration of Print Queues ........................................ 97 Virtual Printers ......................................................... 99 Header and Trailer Files .................................................. 100 Printing ASCII Files on a Postscript Printer ............................... 101 Configuring a Non-supported Printer ..................................... 101 Printer Troubleshooting .............................................. 102 Remote Printing ....................................................... 102 Configuring a Client for Remote Printing .................................. 103 Configuring a Server for Remote Printing ................................. 106 Using the Remote Printer ................................................ 106 Configuring a Network Attached Printer .................................. 107 C(cid:221) o(cid:222) m(cid:223) m(cid:224) Æ o(cid:222)n (cid:226) Unix Printing System (CUPS) ............................. 107 ............................................................. 107 Device Configuration Database ...................................... 109 Device States .......................................................... 111 Example commands to change between the states ........................ 112 Device Addressing .................................................... 113 None-SCSI Devices ...................................................... 113 SCSI Devices ............................................................ 113 PCI Location Codes ...................................................... 114 Configuration for PCI / ISA devices .................................. 114 PCI Devices .............................................................. 114 ISA Devices .............................................................. 115 Obtaining Hardware Configuration .................................. 115 Serial Devices ......................................................... 116 Adding a Terminal ....................................................... 117 Terminal Settings (termcap & terminfo) ................................... 119 Screen Control (tput) ..................................................... 122 Input / Output Maps ...................................................... 123 Setting I/O Options for a Terminal (stty) .................................. 123 TTY Problems ........................................................... 124 Keyboard Mapping for Xstation ...................................... 125 (cid:253) (cid:254) (cid:255) (cid:254) Keyboard Mapping for LFT ............................................... 125 (cid:0) (cid:1) (cid:2) (cid:3) (cid:4) (cid:5) (cid:5) (cid:2) (cid:1) (cid:6) (cid:0) (cid:7) (cid:8) (cid:9) (cid:6) (cid:10) (cid:11) (cid:6) (cid:12) (cid:12) (cid:0) (cid:13) (cid:11) ......................... 126 Script Portability ...................................................... 127 S(cid:243) h(cid:244) ifı ti(cid:246)n(cid:247) gł Arg(cid:243) u(cid:246) mø eœ nß t(cid:252)s (cid:247)(shift) ............................................ 127 ................................................. 128 Components of AIX System Storage ................................ 128 Volume Group (VG) ................................................... 128 Physical Volume (PV) ................................................. 128 Physical Partition (PP) ................................................ 129 Managing Volume Groups ............................................ 129 Volume Group Descriptor Area (VGDA) ................................... 129 Logical Volume (LV) .................................................. 130 File Systems ........................................................... 131 File Systems installed as standard ....................................... 131 Mounting File Systems ................................................... 133 Viewing File Systems .................................................... 135 Structure of a Journaled File System ..................................... 135 Journaled Log ........................................................... 136 Fragmentation ........................................................... 137 Variable Inodes .......................................................... 137 Compressed File Systems ............................................... 137 Large File Enabled File System ........................................... 137 The Logical Volume Manager (LVM) ................................. 138 Volume Groups ........................................................ 138 Mirroring ................................................................ 141 Striping .................................................................. 142 Managing Physical Volumes ......................................... 143 Adding Physical Volumes ................................................ 145 Moving the contents from one PV to another .............................. 145 Managing Logical Volumes ........................................... 146 Policies .................................................................. 149 Intra-physical Volume Allocation Policy ................................... 149 Inter-physical Volume Allocation Policy ................................... 150 Managing File Systems ............................................... 150 Space Management ...................................................... 152 Controlling Disk Usage (quotas) .......................................... 153 Defragmenting a File System ............................................. 155 Verify a File System ...................................................... 155 Paging Space .......................................................... 156 Managing Paging Space ................................................. 157 (cid:14) (cid:15) (cid:16) (cid:17) (cid:18) (cid:19) (cid:20) (cid:21) (cid:22) (cid:23) ........................................................ 158 Basic TCP/IP Networking ............................................. 158 OSI Model ............................................................... 159 More about TCP/IP .................................................... 161 IP Addressing Scheme ............................................... 162 Subnet Masks ........................................................... 164 Sockets ................................................................. 167 Other Addressing Protocols ......................................... 167 Domain Name System (DNS) ......................................... 168 Routing ................................................................ 171 Static Routing ........................................................... 172 ICMP Redirects .......................................................... 172 Dynamic Routing ........................................................ 173 Routing Information Protocol (RIP) ....................................... 174 Open Shortest Path First (OSPF) ......................................... 175 TCP/IP for AIX ......................................................... 176 Configuring TCP/IP ................................................... 176 Networking Software Packages .......................................... 176 Configuring the Adapters ................................................ 177 Setting up TCP/IP ........................................................ 178 Hostname and Address Translation ...................................... 179 Networking Commands .............................................. 180 netstat Command ........................................................ 180 ping Command .......................................................... 181 host Command .......................................................... 183 nslookup ................................................................ 183 tracerte Command ....................................................... 185 route Command .......................................................... 185 arp ...................................................................... 186 Tracing TCP/IP Flows .................................................... 187 Networking Programs ................................................ 189 telnet .................................................................... 189 ftp ....................................................................... 190 rexec .................................................................... 191 rcp / rsh / rlogin .......................................................... 191 finger .................................................................... 191 Mail ..................................................................... 191 NFS ..................................................................... 191 ssh / scp ................................................................. 191 News .................................................................... 191 WWW Browsers .......................................................... 192 Networking Services (Server Applications) ......................... 192 Allowing Multiple Logins ................................................. 193 Anonymous ftp .......................................................... 193 Configuring Domain Name Servers .................................. 194 Setting up a Primary Name Server ........................................ 194 Setting Up a Secondary Name Server ..................................... 198 Caching-Only Name Server ............................................... 200 Forwarder Name Server .................................................. 200 Setting Up a Client .................................................... 200 Delegated Servers ....................................................... 201 Network File System (NFS) ........................................... 202 What is NFS ............................................................. 202 NFS Daemons ........................................................... 204 Authorising NFS Access and Protecting Shared Files ..................... 204 Configuring the NFS Server .............................................. 205 Configuring the NFS Client ............................................... 206 Managing the NFS Daemons ............................................. 208 NFS Commands ......................................................... 209 Automounter .......................................................... 210 Indirect and Direct Map Files ............................................. 210 automount command .................................................... 211 Network Information Service (NIS) ................................... 212 NIS Control of /etc/passwd & /etc/group .................................. 212 NIS Systems ............................................................. 213 NIS Daemons ............................................................ 213 Configuring NIS Master Server ........................................... 215 Configuring a NIS Client .................................................. 216 Removing NIS ........................................................... 216 Serial Connections (Dial / WAN) ..................................... 216 SLIP (Serial Line Internet Protocol) ....................................... 216 PPP (Point-to-Point Protocol) ............................................ 217 TCP/IP Startup ......................................................... 220 Networking Autorisation Files ........................................ 221 $HOME/.netrc ............................................................ 221 /etc/ftpusers ............................................................. 222 /etc/hosts.equiv .......................................................... 222 $HOME/.rhosts ........................................................... 223 IP Version 6 (IPV6) .................................................... 223 Other Networking Protocols and Products .......................... 223 (cid:30) (cid:31) ! " # (cid:30) ! * ( ! + , .................................................. 224 Hardware Initialisation for a Classical RS/6000 ..................... 224 Hardware Initialisation for a PCI RS/6000 ........................... 225 Software Initialisation ................................................. 227 Initialisation - Phase 1 .................................................... 227 Initialisation - Phase 2 .................................................... 228 Initialisation - Phase 3 .................................................... 228 The inittab file ........................................................... 229 Startup Log (alog) ..................................................... 231 System Resource Controller ......................................... 231 Hardware Startup Problems ......................................... 232 Built in Self Test Problems (BIST) - LED 100 to 195 ....................... 233 Power On Self Test Problems (POST) - LED 200 to 299 .................... 233 Problem with Boot Logical Volume (BLV) - LED 201 ....................... 233 Problem Finding the Disk to Boot From - LED 223 ........................ 234 System Crash During Startup - Flashing LED 888 ......................... 234 PCI Power Up Problems .................................................. 234 Fixing a Corrupted BLV .................................................. 235 Service Request Numbers (SRN) ......................................... 236 Software Startup (IPL) Problems ..................................... 236 Root File System cannot be mounted - LED 557 ........................... 236 Corrupt /etc/inittab File - LED 553 ........................................ 237 Phase 3 IPL problems - LED 551, 552, 554, 555 or 556 ..................... 237 Not an AIX File System ................................................... 237 Problem reading ODM Files or running cfgmgr - LED 523 to 537 ........... 237 (cid:30) (cid:31) ! " # $ % & ’ ( ) % # " % ! ........................................ 238 System Shutdown .................................................... 239 Date and Time ......................................................... 240 Changing the Language Environment ............................... 240 (cid:24) (cid:25) (cid:26) (cid:27) (cid:28) (cid:29) ............................................................. 240 Backup Strategy ....................................................... 241 Example Backup Strategy ................................................ 241 Backup Devices ......................................................... 242 Backup Command (backup, restore) ...................................... 243 Rootvg Backup (mksysb) ................................................ 245 Other VG Backups (savevg, restvg) ....................................... 247 Tape Archive (tar) ........................................................ 247

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.