UNIX System Administration phần 1 pps

30 262 0
UNIX System Administration phần 1 pps

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

September 23, 1998 UNIX  System Administration Frank G. Fiamingo fgf+@osu.edu University Technology Services The Ohio State University 2 © 1998 University Technology Services, The Ohio State University UNIX System Administration  1991-1998 University Technology Services, The Ohio State University, Baker Systems Engineering Building, 1971 Neil Avenue, Columbus, OH 43210. All rights reserved. Redistribution and use, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions must retain the above copyright notice, this list of conditions, and the following disclaimer. 2. Neither the name of the University nor the names of its contributors may be used to endorse or promote products or services derived from this document without specific prior written permission. THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THIS PUBLICATION MAY INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. UNIX is a registered trademark of The Open Group. Sun, SunOS, Solaris, SPARC, NFS, NIS, NIS+, JumpStart, OpenWindows, Sunview and SunInstall are trademarks or registered trademarks of Sun Microsystems, Inc. Ultrix, Digital UNIX and DEC are trademarks of Digital Equipment Corporation. HP-UX is a trademark of Hewlett-Packard Co. IRIX is a trademark of Silicon Graphics, Inc. AIX is a trademark of International Business Machines, Inc. AT&T is a trademark of American Telephone and Telegraph, Inc. GNU is a trademark of the Free Software Foundation. X Window System is a trademark of Massachusetts Institute of Technology. Ethernet is a registered trademark of Xerox Corporation. Netscape is a copyright of Netscape Communications Crop. Mosaic is a copyright of the National Center for Supercomputing Applications at the University of Illinois, Urbana-Champaign. All other products mentioned are trademarks of their respective owners. This publication is available via the Internet as: ftp://wks.uts.ohio-state.edu/sysadm_course/sysadm_book.ps and http://wks.uts.ohio-state.edu/sysadm_course/sysadm.html. Also available via the Internet is Introduction to Unix: ftp://wks.uts.ohio-state.edu/unix_course/unix_book.ps and http://wks.uts.ohio-state.edu/unix_course/unix.html. Acknowledgements: The author wishes to thank the following for helpful advice and discussions related to the material presented in this document: Harpal Chohan, Bob DeBula, Bob Manson, Steve Romig, and Bill Yang. UNIX System Administration © 1998 University Technology Services, The Ohio State University 3 Table of Contents PART I Introduction 9 1 Overview 11 1.1 What is UNIX System Administration? 11 1.2 Daily Tasks of a System Administrator 11 1.3 Startup and Shutdown 11 1.4 Periodic Processes 12 1.5 Managing File Systems 12 1.6 Responsibilities to the users 12 1.7 Hardware responsibilities 12 1.8 Types of SunOS Systems 12 1.9 Resources for System Administrators 13 1.10 UTS Software Support 15 2 Disk Structure and Partitions 17 2.1 Disk Structure and Partitions 17 2.2 Disk Partitions 19 3 Devices 27 3.1 Logical Names 27 3.2 Disk Partitioning 28 3.3 Disk Label and Bootblock 31 3.4 Tapes 32 4 The UNIX File System 33 4.1 File Systems 33 4.2 File System Types 35 4.3 Compatibility 38 4.4 Names & contents of important UNIX directories 40 4.5 File structure of standalone and server machines 43 4.6 Disk Partitioning 43 5 File System Management 45 5.1 File System Management 45 5.2 Fsck 46 5.3 Disk Check Commands 47 4 © 1998 University Technology Services, The Ohio State University UNIX System Administration 5.4 Swapping and Paging 48 5.5 Adding swap space 49 5.6 Setting up a Cache File System 50 5.7 XFS (IRIX) 52 5.8 File System Quotas 52 5.9 Miscellaneous useful commands 53 5.10 Log files 54 6 Startup and Shutdown 55 6.1 Booting 55 6.2 Run Levels (SunOS 5.X, IRIX 5.X) 57 6.3 /etc/inittab (SunOS 5.X, IRIX 5.X, Digital UNIX) 57 6.4 Sun PROM 65 6.5 SGI Indy PROM 67 6.6 Diskless Workstations 67 6.7 Shutdown 69 6.8 Crashes 70 7 Operating System Installation 71 7.1 Suninstall 71 7.2 SunOS 4.1.X 71 7.3 SunOS 5.X 74 7.4 Post Install Actions 84 7.5 Sun Patch List 86 7.6 IRIX 5.X 90 8 Kernel Configuration 91 8.1 SunOS 4.1.X 91 8.2 SunOS 5.X 92 8.3 IRIX 5.X 100 8.4 Digital UNIX 101 8.5 Ultrix 101 9 Adding Hardware 103 9.1 SunOS 4.1.X 103 9.2 SunOS 5.X 110 9.3 IRIX 5.X 110 10 Special Files 111 10.1 Special Files 111 10.2 SunOS 4.X 112 10.3 SunOS 5.X 112 10.4 IRIX 5.X 113 10.5 Ultrix and Digital UNIX 114 11 System Directories 115 11.1 System Directories 115 11.2 / - root 115 11.3 /etc - system and network configuration 118 UNIX System Administration © 1998 University Technology Services, The Ohio State University 5 11.4 /usr - system programs, libraries, etc. 120 12 User accounts 123 12.1 User accounts 123 12.2 Admittance - login procedure 126 12.3 Password Aging, SunOS 4.1.X 126 13 Daily System Administration 127 13.1 User and Group Administration 127 13.2 Communicating with system users 129 13.3 Running programs automatically, cron & at 129 14 Administration Tool & Solstice Adminsuite 131 14.1 Admintool 131 14.2 Solstice Adminsuite 131 14.3 Services Managed 132 14.4 The Distributed System Administration Daemon 140 14.5 Program Locations 140 15 Package Administration 141 15.1 Packages 141 15.2 Packages Distributed with Solaris 2.5 143 15.3 Swmtool 150 15.4 SunOS 4.X 152 15.5 IRIX 5.X 153 15.6 Digital UNIX and Ultrix 154 16 Backup Procedures 155 16.1 Backup Procedures 155 16.2 Backup strategies 155 16.3 Backup and Restore Commands 156 PART II Network Services 161 17 Service Access Facility 163 17.1 Overview of Service Access 163 17.2 Service Access Facility Overview 164 17.3 Service Access Controller 164 17.4 Port Monitors 165 17.5 Setting Up a Terminal 166 17.6 Network Port Monitors 168 17.7 Terminal Control 170 17.8 Summary 172 18 The Network 173 18.1 The Network 173 18.2 Hardware used in a network 174 18.3 Ethernet Frame 175 18.4 Trouble shooting the Ethernet 176 18.5 Monitoring the network 177 6 © 1998 University Technology Services, The Ohio State University UNIX System Administration 18.6 Difference between Ethernet and Internet Addresses 179 19 Network Administration 181 19.1 Network Initialization 181 19.2 Host Names and addresses 185 19.3 Services 187 19.4 Network Programs 188 19.5 SunOS 5.X 191 19.6 Ultrix and Digital UNIX 193 19.7 Miscellaneous Configuration Files 194 20 Distributed File System Administration 195 20.1 Distributed File Systems 195 20.2 NFS Protocol 196 20.3 SunOS 4.1.X 198 20.4 SunOS 5.X 202 20.5 DFS Command Summary 205 20.6 IRIX 5.X, Ultrix and Digital UNIX 206 20.7 NFS statistics 206 21 Network Information Services (NIS and NIS+) 209 21.1 What is it and what does it do for you? 209 21.2 NIS 209 21.3 NIS+ 211 22 Adding Clients 219 22.1 Clients 219 22.2 Server configuration and software 219 22.3 Installing the client of a server, SunOS 4.1.X 220 22.4 JumpStart 221 22.5 AutoClient 221 PART III Selected Topics 223 23 Usenet 225 23.1 Usenet 225 23.2 Reading news, rn/rrn/xrn/trn/nn 226 23.3 Network news transfer protocol, nntp 226 23.4 Disk space requirements 226 23.5 Relevant UNIX newsgroups 227 24 Useful Utilities 229 24.1 Format online manual pages, catman 229 24.2 System process status, ps 230 24.3 Swap space and kernel inode usage, pstat 231 24.4 top 231 24.5 vmstat 232 24.6 iostat 234 24.7 ProCtool 236 UNIX System Administration © 1998 University Technology Services, The Ohio State University 7 24.8 System usage, uptime, users, who and w 239 24.9 File Compression, compress & gzip 240 24.10 Shells, tcsh & bash 240 25 Print Service 241 25.1 SunOS 4.1.X 241 25.2 SunOS 5.X 243 25.3 IRIX 5.X 252 25.4 Ultrix and Digital UNIX 252 26 Mail 253 26.1 Send and receive electronic mail via SMTP, sendmail 253 26.2 Network mail configuration file 253 26.3 The mail alias file 254 26.4 Installation of sendmail 255 26.5 Security 256 26.6 Mail programs, mail, Mail, Columbia mm, elm, etc. .256 27 World Wide Web 257 27.1 WWW 257 27.2 URLs 257 27.3 WWW Server 258 27.4 WWW Browsers 258 27.5 Setting up your Server 258 27.6 Home Page 260 28 System Security 265 28.1 Security Concerns 265 28.2 What needs to be Secured? 266 28.3 Security Programs 266 28.4 Security Response Teams 267 28.5 The password and group files 267 28.6 File and Directory Permissions 269 28.7 EEPROM Security 269 28.8 Secure the console port 270 28.9 Security Loopholes 271 28.10 Additional Security Features in SunOS 5.X 273 28.11 SRI Security Report 275 28.12 CERT Security Advisories 276 29 Secure Shell, SSH 277 29.1 Secure SHell 277 29.2 SSH Programs 279 29.3 Control Files 280 29.4 Setting up the Service 284 29.5 Login Process 286 29.6 Installation 287 PART IV Summary 291 8 © 1998 University Technology Services, The Ohio State University UNIX System Administration 30 Summary of SunOS/Solaris Differences 293 30.1 SunOS 4.1.X and 5.X Administrative Command Differences 293 30.2 SunOS 4.1.X and 5.X Administrative File Differences 296 31 UTS UNIX Workstation Support 297 31.1 UTS WORKSTATION SUPPORT TEAM 297 31.2 Software 298 UNIX System Administration © 1998 University Technology Services, The Ohio State University 9 PART I Introduction Overview Disk Structure Devices File Systems Startup & Shutdown Installation Kernel Configuration Adding Hardware Special Files System Directories User Accounts Daily System Administration Administration Tool & Solstice AdminSuite Package Administration Backup Procedures 10 © 1998 University Technology Services, The Ohio State University UNIX System Administration Introduction [...]... bsize cpg] 4.2BSD 10 24 819 2 16 unused 10 24 819 2 unused 10 24 819 2 unused 10 24 819 2 unused 10 24 819 2 unused 10 24 819 2 4.2BSD 10 24 819 2 16 4.2BSD 10 24 819 2 16 © 19 98 University Technology Services, The Ohio State University # # # # # # # # (Cyl 0 - 16 4*) (Cyl 16 4*- 492*) (Cyl 0 - 2569) (Cyl 492*- 11 85*) (Cyl 11 85*- 18 77*) (Cyl 18 77*- 2569*) (Cyl 492*- 17 47*) (Cyl 17 47*- 2569*) UNIX System Administration. .. Business Media, Inc., 10 1 Witmer Rd., Horsham, PA 17 6 01 SysAdmin - monthly publication, 16 01 W 23rd St., Suite 200, Lawrence, KS 66046-9950 ( 913 -8 411 6 31) 1. 9.3 Books 1. 9.3 .1 Unix and the Internet A Student’s Guide to Unix, Harley Hahn (McGraw Hill, 19 93, ISBN 0-07-025 511 -3) UNIX in a Nutshell for BSD 4.3, A Desktop Quick Reference (O’Reilly & Associates, Inc 19 90, 093 717 5-20-x) UNIX in a Nutshell, A... OSs.) 1. 9.3.2 System Administration UNIX System Administration Handbook, 2nd Ed., Evi Nemeth, Garth Snyder, Scott Seabass and Trent Hein (Prentice-Hall, 19 95, ISBN 0 -13 -15 10 51- 722) (Includes a CD-ROM) Essential System Administration, 2nd Ed., Aeleen Frisch (O’Reilly, 19 95, ISBN 1- 56592 -12 7-5) When You Can’t Find Your UNIX System Administrator, Linda Mui (O’Reilly & Associates, Inc., 19 95, ISBN 1- 56592 -10 4-6)... 1- 56592 -10 4-6) Solaris System Administrator’s Guide, Janice Winsor (Ziff-Davis, 19 93, ISBN 1- 56276-080-7) Solaris Advanced System Administrator’s Guide, Janice Winsor (Ziff-Davis, 19 93, ISBN 1- 5627 613 1-5) System Performance Tuning, Mike Loukides (O’Reilly & Associates, 19 91, ISBN 0-93 717 5-60-9) Sun Performance and Tuning, Adrian Cockroft (Prentice Hall, 19 95, ISBN 0 -13 -14 9642-5) Unix System V Release 4 Administration, ... Stamps Size 1 2 3 4 5 6 7 8 9 10 11 12 Single Indirects Double Indirects Triple Indirects Data Block for Pointers Data Blocks D D D D P D P D P D Each pointer is 4 bytes long ⇒ 819 2 bytes/pointer block ÷ 4 bytes/pointer ∗ 819 2 bytes/data block ⇒ 1. 7 ∗ 10 7 bytes for a single indirect ∗ ( 819 2/4) ⇒ 3.4 ∗ 10 10 bytes for a double indirect ∗ ( 819 2/4)2 ⇒ 7.0 ∗ 10 13 bytes for a triple indirect UNIX System Administration. .. Associates, 19 91, ISBN 093 717 5-64 -1) The Whole Internet - User’s Guide & Catalog, 2nd Ed., Ed Krol (O’Reilly, 19 94, ISBN 1- 56592-0635) UNIX System Administration © 19 98 University Technology Services, The Ohio State University 13 Overview Zen and the Art of the Internet, 3rd Ed., Brendan Kehoe (19 94, ISBN 013 -12 1492-6) UNIX Power Tools, Jerry Peek, Tim O’Reilly, and Mike Loukides (O’Reilly & Associates, 19 93,... Associates, 19 94, ISBN 15 6592-056-2) Panic! UNIX System Crash Dump Analysis, Chris Drake and Kimberley Brown (SunSoft Press, 19 95, ISBN 0 -13 -14 9386-8) (Includes a CD-ROM) 1. 9.3.3 Security UNIX System Security, Patrick Wood and Stephen G Kochan (Hayden Books, 19 85, ISBN 0- 810 46267) Practical UNIX & Internet Security, 2nd Ed., Simon Garfinkel and Gene Spafford (O’Reilly & Associates, 19 96, ISBN 1- 56592 -14 8-8)... flags: bytes/sector: 512 sectors/track: 57 tracks/cylinder: 14 sectors/cylinder: 798 cylinders: 2570 sectors/unit: 2050860 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 track-to-track seek: 0 drivedata: 0 8 partitions: # size offset a: 13 1072 0 b: 26 214 4 13 1072 c:2050860 0 d: 552548 393 216 e: 552548 945764 f: 552548 14 98 312 g :10 010 00 393 216 h: 656644 13 94 216 22 # milliseconds #... Dimensions: * 512 bytes/sector * 80 sectors/track * 9 tracks/cylinder * 720 sectors/cylinder * 2500 cylinders * 11 51 accessible cylinders * Flags: * 1: unmountable * 10 : read-only * * First Sector Last * Partition Tag Flags Sector 0 2 00 0 1 3 01 37440 2 5 00 0 5 6 00 10 3680 6 4 00 45 216 0 7 8 00 739440 30 Count 37440 66240 828720 348480 287280 89280 Sector 37439 10 3679 828 719 45 215 9 739439 828 719 © 19 98 University... Smith (Hayden, 19 91, ISBN 0-672-22 810 -6) Managing NFS and NIS, Hal Stern (O’Reilly & Associates, 19 91, ISBN 0-93 717 5-75-7) All About Administering NIS+, Rick Ramsey (SunSoft Press/Prentice Hall, 19 92, ISBN 013 -0688002) DNS and BIND, Paul Albitz and Cricket Liu (O’Reilly & Associates, 19 93, ISBN 1- 56592- 010 -4) TCP/IP Network Administration, Craig Hunt (O’Reilly & Associates, 19 92, ISBN 0-93 717 5-82-X) sendmail, . 11 1 10 .1 Special Files 11 1 10 .2 SunOS 4.X 11 2 10 .3 SunOS 5.X 11 2 10 .4 IRIX 5.X 11 3 10 .5 Ultrix and Digital UNIX 11 4 11 System Directories 11 5 11 .1 System Directories 11 5 11 .2 / - root 11 5 11 .3 /etc. 91 8 .1 SunOS 4 .1. X 91 8.2 SunOS 5.X 92 8.3 IRIX 5.X 10 0 8.4 Digital UNIX 10 1 8.5 Ultrix 10 1 9 Adding Hardware 10 3 9 .1 SunOS 4 .1. X 10 3 9.2 SunOS 5.X 11 0 9.3 IRIX 5.X 11 0 10 Special Files 11 1 10 .1. Network Administration 18 1 19 .1 Network Initialization 18 1 19 .2 Host Names and addresses 18 5 19 .3 Services 18 7 19 .4 Network Programs 18 8 19 .5 SunOS 5.X 19 1 19 .6 Ultrix and Digital UNIX 19 3 19 .7

Ngày đăng: 14/08/2014, 02:22

Mục lục

  • 1 Overview 11

    • 1.1 What is UNIX System Administration? 11

    • 1.2 Daily Tasks of a System Administrator 11

    • 1.6 Responsibilities to the users 12

    • 1.8 Types of SunOS Systems 12

    • 1.9 Resources for System Administrators 13

    • 2 Disk Structure and Partitions 17

      • 2.1 Disk Structure and Partitions 17

      • 3.3 Disk Label and Bootblock 31

      • 5.6 Setting up a Cache File System 50

      • 10.5 Ultrix and Digital UNIX 114

      • 11.3 /etc - system and network configuration 118

      • 12.2 Admittance - login procedure 126

      • 13 Daily System Administration 127

        • 13.1 User and Group Administration 127

        • 13.2 Communicating with system users 129

        • 15.6 Digital UNIX and Ultrix 154

        • 16.3 Backup and Restore Commands 156

        • PART II Network Services 161

        • 17 Service Access Facility 163

          • 17.1 Overview of Service Access 163

          • 17.2 Service Access Facility Overview 164

          • 17.5 Setting Up a Terminal 166

          • 18.2 Hardware used in a network 174

Tài liệu cùng người dùng

Tài liệu liên quan