Linux System Administration — Students' Notes

Total Page:16

File Type:pdf, Size:1020Kb

Linux System Administration — Students' Notes Linux system administration — Students’ notes Anton Altaparmakov Darran Bryant David Carter Bob Dowling Ben Harris Julian King Stella Page December 16, 2003 1 2 CONTENTS 3 Contents 0 Introductory remarks 21 0.1 This course . 21 0.2 Linux . 23 1 Installing Red Hat Linux 31 1.1 Concepts . 32 1.2 Before you install . 38 1.3 An installation walk through . 41 2 XFree86 61 2.1 Introduction . 61 2.1.1 Graphics cards . 61 2.1.2 Framebuffers and VESA mode . 61 2.1.3 Some DDC magic . 61 2.1.4 Power Management . 62 2.2 Configuring XFree86 . 62 2.2.1 Device . 67 2.2.2 Mice . 68 2.2.3 Keyboards . 71 2.2.4 Files . 72 2.2.5 Monitor . 73 2.2.6 Screen . 75 2.3 ServerLayout . 77 2.4 Commercial X servers . 78 2.5 Window Managers . 78 4 CONTENTS 2.6 Play time . 80 2.7 External Documentation . 82 2.8 Graphical Logins . 82 3 The Red Hat Software Package System 83 3.1 Software management . 83 3.2 Querying packages . 85 3.3 Installing packages . 91 3.4 Dependencies . 94 3.5 Removing packages . 96 3.6 Overriding dependency checks . 97 3.7 Upgrading packages . 98 3.8 Checking a package . 100 3.9 Postinstall scripts . 103 3.10 Miscellaneous notes . 104 3.11 Building software from source code . 104 4 Boot sequence 109 4.1 Introduction . 109 4.2 BIOS – the Basic Input/Output System . 109 4.3 GNU GRUB – The Grand Unified Bootloader . 111 4.4 Kernel startup . 115 4.5 init . 116 4.6 Changing runlevels . 122 5 Network concepts 125 CONTENTS 5 6 The kernel 149 6.1 /proc: The window on the kernel . 149 6.2 Kernel upgrades . 151 7 Service configuration 155 7.1 Continually running services . 155 7.2 Network services run from xinetd . 158 7.3 Services run from crond . 161 7.4 Log files . 164 7.5 A review of common services . 165 8 Managing users and groups 171 9 Practical filesystems 183 9.1 Introduction . 183 9.2 Hardware . 183 9.3 Filetypes . 184 9.4 What is in a name? . 185 9.5 Partitioning disks . 185 9.6 fdisk . 185 9.7 Things you need to know to use fdisk . 186 9.8 Using fdisk . 186 9.9 Creating a partition . 188 9.10 Filesystems . 189 9.11 Creating a filesystem . 190 9.12 Mounting filesystems . 190 9.13 /etc/fstab . 192 6 CONTENTS 9.14 tunefs . 192 9.15 Backups . 193 9.16 Filesystems concepts . 194 9.16.1 Mode . 195 9.16.2 Timestamps . 195 9.17 fsck . 196 9.18 Advanced Filesystems . 197 10 Security 199 10.1 Defences . 200 10.2 Access controls . 202 10.3 Password security . 205 10.4 Network sniffing . 206 10.5 SSH – the Secure Shell . 207 10.6 X11 security . 210 10.7 Threat models – know your enemy . 212 10.8 Dealing with attacks . 214 11 The Network File System 217 11.1 Introduction . ..
Recommended publications
  • Red Hat Linux 5.2
    Red Hat Linux 5.2 The Official Red Hat Linux Installation Guide Red Hat Software, Inc. Research Triangle Park, North Carolina Copyright ­c 1995, 1996, 1997, 1998 Red Hat Software, Inc. Red Hat is a registered trademark and the Red Hat Shadow Man logo, RPM, the RPM logo, and Glint are trademarks of Red Hat Software, Inc. Linux is a registered trademark of Linus Torvalds. Motif and UNIX are registered trademarks of The Open Group. Alpha is a trademark of Digital Equipment Corporation. SPARC is a registered trademark of SPARC International, Inc. Products bearing the SPARC trade- marks are based on an architecture developed by Sun Microsystems, Inc. Netscape is a registered trademark of Netscape Communications Corporation in the United States and other countries. Windows is a registered trademark of Microsoft Corporation. All other trademarks and copyrights referred to are the property of their respective owners. ISBN: 1-888172-19-3 Revision: Inst-5.2-Print-RHS (10/98) Red Hat Software, Inc. 4201 Research Commons, Suite 100 79 T. W. Alexander Drive P. O. Box 13588 Research Triangle Park, NC 27709 (919) 547-0012 [email protected] http://www.redhat.com While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information con- tained herein. The Official Red Hat Linux 5.2 Installation Guide may be reproduced and distributed in whole or in part, in any medium, physical or electronic, so long as this copyright notice remains intact and unchanged on all copies.
    [Show full text]
  • Introduction to Linux
    Introduction to Linux A Hands on Guide Machtelt Garrels CoreSequence.com <[email protected]> Version 1.8 Last updated 20030916 Edition Introduction to Linux Table of Contents Introduction.........................................................................................................................................................1 1. Why this guide?...................................................................................................................................1 2. Who should read this book?.................................................................................................................1 3. New versions of this guide...................................................................................................................1 4. Revision History..................................................................................................................................1 5. Contributions.......................................................................................................................................2 6. Feedback..............................................................................................................................................2 7. Copyright information.........................................................................................................................3 8. What do you need?...............................................................................................................................3 9. Conventions used
    [Show full text]
  • Survivable Software Distribution and Maintenance Jeff Breidenbach OCT
    Survivable Software Distribution and Maintenance by Jeff Breidenbach Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Master of Engineering in Electrical Engineering and Computer Science at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY May 1997 © Jeff Breidenbach, MCMXCVII. All rights reserved. The author hereby grants to MIT permission to reproduce and distribute publicly paper and electronic copies of this thesis document in whole or in part, and to grant others the right to do so. A uthor ..................... ... ...... .. .... A/o Department of Electrical Engineering and Computer Science May 23, 1997 Certified by .... ... Clifford Weinstein Group Leader ,-ý7 Thesis Supervisor Certified by ........ .. L...... : ..... Thomas M. Parks Technical Staff Thesis Supervisor ( Accepted by... ................. ..----------- Arthur C. Smith Chairman, Department Committee on Graduate Students OCT 2 9 1997 Survivable Software Distribution and Maintenance by Jeff Breidenbach Submitted to the Department of Electrical Engineering and Computer Science on May 23, 1997, in partial fulfillment of the requirements for the degree of Master of Engineering in Electrical Engineering and Computer Science Abstract This thesis describes a software distribution and maintenance system that reduces administration costs while increasing survivability. Contributions include design, im- plementation, and analysis. The system applies automation wherever possible and takes maximum advantages of economies of scale. The implementation extends an existing replication tool to provide multiplatform support, user assisted cache management, and support for middlemen in the distri- bution system. Middlemen relieve both system administrators and end users of ad- ministration and maintenance tasks. This arrangement leads to higher survivability, lower operating costs, and allows new value added services in software maintenance.
    [Show full text]
  • LPI Certification 102 (Release 2) Exam Prep, Part 1
    LPI certification 102 (release 2) exam prep, Part 1 Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Before you start......................................................... 2 2. Shared libraries......................................................... 4 3. Compiling applications from sources ............................... 7 4. Package management concepts .................................... 14 5. rpm, the (R)ed Hat (P)ackage (M)anager .......................... 15 6. Debian package management ....................................... 22 7. Summary and resources .............................................. 27 LPI certification 102 (release 2) exam prep, Part 1 Page 1 of 28 ibm.com/developerWorks Presented by developerWorks, your source for great tutorials Section 1. Before you start About this tutorial Welcome to "Compiling sources and managing packages," the first of four tutorials designed to prepare you for the Linux Professional Institute's 102 exam. In this tutorial, we'll show you how to compile programs from sources, how to manage shared libraries, and how to use the Red Hat and Debian package management systems. This tutorial on compiling sources and managing packages is ideal for those who want to learn about or improve their Linux package management skills. This tutorial is particularly appropriate for those who will be setting up applications on Linux servers or desktops. For many readers, much of this material will be new, but more experienced Linux users may find this tutorial to be a great way to "round out" their important Linux system administration skills. If you are new to Linux, we recommend that you start with Part 1 and work through the series from there.
    [Show full text]
  • Linux Thin Client Networks Design and Deployment
    Linux Thin Client Networks Design and Deployment A quick guide for System Administrators David Richards BIRMINGHAM - MUMBAI Linux Thin Client Networks Design and Deployment A quick guide for System Administrators Copyright © 2007 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: August 2007 Production Reference: 1030807 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847192-04-2 www.packtpub.com Cover Image by Andrew Jalali (www.acjalali.com) Credits Author Project Manager David Richards Patricia Weir Reviewers Project Coordinator Diego Torres Milano Sagara Naik Blaine Hilton Indexer Senior Acquisition Editor Bhushan Pangaonkar David Barnes Proofreader Development Editor Chris Smith Nikhil Bangera Production Coordinator Technical Editor Shantanu Zagade Rajlaxmi Nanda Cover Designer Editorial Manager Shantanu Zagade Dipali Chittar About the Author David Richards is a System Administrator for the City of Largo, Florida.
    [Show full text]
  • LPI Certification 101 Exam Prep, Part 1
    LPI certification 101 exam prep, Part 1 Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. About this tutorial....................................................... 2 2. Introducing bash........................................................ 3 3. Using Linux commands ............................................... 7 4. Creating links and removing files .................................... 12 5. Introducing wildcards .................................................. 16 6. Resources and feedback ............................................. 19 LPI certification 101 exam prep, Part 1 Page 1 of 20 Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Section 1. About this tutorial What does this tutorial cover? Welcome to "Linux fundamentals", the first of four tutorials designed to prepare you for the Linux Professional Institute's 101 exam. In this tutorial, we'll introduce you to bash (the standard Linux shell), show you how to take full advantage of standard Linux commands like ls, cp, and mv, explain Linux's permission and ownership model, and much more. By the end of this tutorial, you'll have a solid grounding in Linux fundamentals and will even be ready to begin learning some basic Linux system administration tasks. By the end of this series of tutorials (eight in all), you'll have the knowledge you need to become a Linux Systems Administrator and will be ready to attain an LPIC Level 1 certification from the Linux Professional Institute if you so choose. The LPI logo is a trademark of Linux Professional Institute. Should I take this tutorial? This tutorial (Part 1) is ideal for those who are new to Linux, or those who want to review or improve their understanding of fundamental Linux concepts, such as copying files, moving files, and creating symbolic and hard links.
    [Show full text]
  • Introduction to Linux
    KOAN - embedded software engineering – Bergamo – Italia – http://koansoftware.com Introduction to Linux A Hands on Guide Machtelt Garrels Garrels.be <tille wants no spam _at_ garrels dot be> 1.27 Edition Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008 Machtelt Garrels 20080606 Introduction to Linux Table of Contents Introduction.........................................................................................................................................................1 1. Why this guide?...................................................................................................................................1 2. Who should read this book?.................................................................................................................1 3. New versions and availability..............................................................................................................1 4. Revision History..................................................................................................................................2 5. Contributions.......................................................................................................................................3 6. Feedback..............................................................................................................................................3 7. Copyright information.........................................................................................................................3 8. What do you need?...............................................................................................................................4
    [Show full text]
  • Introduction to Linux [Pdf]
    Introduction to Linux A Hands on Guide Machtelt Garrels Garrels.be <tille wants no spam _at_ garrels dot be> 1.27 Edition Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008 Machtelt Garrels 20080606 Introduction to Linux Table of Contents Introduction.........................................................................................................................................................1 1. Why this guide?...................................................................................................................................1 2. Who should read this book?.................................................................................................................1 3. New versions and availability..............................................................................................................1 4. Revision History..................................................................................................................................2 5. Contributions.......................................................................................................................................3 6. Feedback..............................................................................................................................................3 7. Copyright information.........................................................................................................................3 8. What do you need?...............................................................................................................................4
    [Show full text]
  • Widget Engine
    Topic relevant selected content from the highest rated entries, typeset, printed and shipped. Combine the advantages of up-to-date and in-depth knowledge with the convenience of printed books. A portion of the proceeds of each book will be donated to the Wikimedia Foundation to sup- port their mission: to empower and engage people around the world to collect and develop educational content under a free license or in the public domain, and to disseminate it effec- tively and globally. The content within this book was generated collaboratively by volunteers. Please be advised that nothing found here has necessarily been reviewed by people with the expertise required to provide you with complete, accurate or reliable information. Some information in this book maybe misleading or simply wrong. The publisher does not guarantee the validity of the infor- mation found here. If you need specific advice (for example, medical, legal, financial, or risk management) please seek a professional who is licensed or knowledgeable in that area. Sources, licenses and contributors of the articles and images are listed in the section entitled “References”. Parts of the books may be licensed under the GNU Free Documentation License. A copy of this license is included in the section entitled “GNU Free Documentation License” All used third-party trademarks belong to their respective owners. Contents Articles Widget engine 1 adesklets 4 AveDesk 5 Comparison of widget engines 8 Dashboard (software) 13 DesktopX 17 gDesklets 20 Google Gadgets 21 HTML Application
    [Show full text]
  • What Are Red Hat Enterprise Linux and Fedora?
    Chapter 1 An Overview of Fedora and Red Hat Enterprise Linux In This Chapter • Introducing Fedora and RHEL • What is Linux? • Linux’s roots in UNIX • Common Linux features • Primary advantages of Linux • What is Fedora? • Why choose Fedora? • The culture of free software Linux was a phenomenon waiting to happen. The computer industry suffered from a rift. In the 1980s and 1990s, people had to choose between inexpensive, market-driven PC operating systems from Microsoft and expensive, technology-driven operating systems such as UNIX. Free software was being created all over the world, but lacked a common platform to rally around. Linux has become that common platform. For several years, Red Hat Linux was the most popular commercial distribution of Linux. In 2003, Red Hat, Inc. changed the name of its distribution from Red Hat Linux to Fedora Core and moved its commercial efforts toward its Red Hat Enterprise Linux products. It then set up Fedora to be: • Sponsored COPYRIGHTEDby Red Hat MATERIAL • Supported by the Linux community • Inclusive of high-quality, cutting-edge open source technology • A proving ground for software slated for commercial Red Hat deployment and support Red Hat Enterprise Linux, on the other hand, became the basis for Red Hat’s fully supported product line, geared toward big companies with the need to set up and manage many Linux 4 Part I: Getting Started in Fedora and RHEL systems. After taking its software through about a year and a half of Fedora releases (about once every six months), a commercial Red Hat Enterprise
    [Show full text]
  • Tema 2: Introducción a Los Sistemas Linux/Unix
    ´Indice Introducci´ona . Tema 2: Introducci´ona los sistemas Instalaci´ondel . Linux/Unix Uso de la l´ıneade . Programaci´onde . Manejo de ficheros . Programaci´onen . Administraci´onde Sistemas e Redes Introducci´ona Perl . Tom´asFern´andezPena P´aginawww [email protected] P´aginainicial JJ II J I P´agina1 de 347 Regresar Pantalla completa Cerrar Abandonar ´Indice ´Indice Introducci´ona . • Introducci´ona Unix y Linux. Instalaci´ondel . • Instalaci´ondel sistema y de software. Uso de la l´ıneade . Programaci´on de . • Uso de la l´ınea de comandos. Manejo de ficheros . • Programaci´onde scripts de administraci´on. Programaci´on en . Introducci´ona Perl . • Manejo de ficheros de texto. P´aginawww • Python y otros lenguajes de script. P´aginainicial JJ II J I P´agina2 de 347 Regresar Pantalla completa Cerrar Abandonar 1. Introducci´ona Unix y Linux ´Indice Introducci´ona . Caracter´ısticasde UNIX: Instalaci´ondel . • Sistema operativo potente, flexible y vers´atil. Uso de la l´ıneade . Programaci´on de . • Caracter´ısticas: portabilidad, adaptabilidad y simplicidad, naturaleza multiusuario y multitarea, adecuaci´ona re- Manejo de ficheros . des. Programaci´on en . Introducci´ona Perl . • Disponibilidad de c´odigofuente (algunas versiones) P´aginawww • Implementado casi´ıntegramente en C (lenguaje de alto nivel). P´aginainicial GNU/Linux: JJ II • Sistema operativo libre, de c´odigo abierto, similar a Unix J I • C´odigofuente con licencia GPL P´agina3 de 347 • Disponible para un gran n´umeroy variedad de sistemas: su- Regresar percomputadores, servidores, sobremesas, port´atiles,PDAs, Pantalla completa m´oviles,sistemas empotrados,. Cerrar Abandonar Historia de Unix ´Indice • Multics: proyecto de Bell Labs (AT&T), General Electrics Introducci´ona .
    [Show full text]