1 TAC2000/ IP Telephony Lab Advanced Linux Administration Language: Offered in English Instructor: Dr. Quincy Wu ( ) Time: Tuesday 17:30-20:00 Place: Computer Center 027
2 TAC2000/ IP Telephony Lab Reading Requirement Textbook Nate Campi and Kirk Bauer, "Automating Linux and UNIX System Administration", 2nd Ed. Publication: Berkeley, Calif., New York Springer Science & Business Media, (NCNU NetLibrary) Nate Campi and Kirk Bauer, "Automating Linux and UNIX System Administration", 2nd Ed. Publication: Berkeley, Calif., New York Springer Science & Business Media, (NCNU NetLibrary) References Online manpage Online manpage GNU Info GNU Info Linux Documentation Project ( Linux Documentation Project ( LAMP: The Open Source Web Platform ( LAMP: The Open Source Web Platform ( Librenix - Linux Sysadmin Portal ( Librenix - Linux Sysadmin Portal ( Linux Magazine ( Linux Magazine ( Linux Journal ( Linux Journal (
3 TAC2000/ IP Telephony Lab Three Hours in Each Week Chapter presentation (60min) Package introduction (45min*2) Hands-on and free Q&A In addition to the 3 hours in class, you also need to spend 3 hours in reading the textbook 3 hours in reading the textbook 3 hours to try installing and configuring new services 3 hours to try installing and configuring new services 3 hours to read on-line documents 3 hours to read on-line documents
4 TAC2000/ IP Telephony Lab Evaluation Homework (30%) Oral Presentation (30%) Participation (20%) Term Project (20%) Active participation is expected. Everyone must ask/answer questions during a presentation.
5 TAC2000/ IP Telephony Lab Outline Introducing the Basics of Automation Basic Tools Using SSH to Automate System Administration Securely Configuring Systems with cfengine Creating Login Scripts and Shell Scripts Pre-Installation: Network Preparation and Management Automating and Customizing Installation Automatic System Configuration Sharing Data Between Systems Packages and Patches System Maintenance and Changes Generating Reports and Analyzing Logs System Monitoring Improving System Security Backing Up and Restoring Data User Interfaces
6 TAC2000/ IP Telephony Lab Any Question So Far?
7 TAC2000/ IP Telephony Lab Importance of Automation You can configure everything by hand, if you only manage 2 or 3 computers. As the number of systems grows to more than ten, you need to spend time repeating the same things over and over again. During the so- called “tech downturn” around the year 2003 in Silicon Valley, you may suddenly find yourself the sole member of what had been a three- person system- administration team. The number of systems and responsibilities were increasing, while staffing levels had dramatically decreased. The number of systems and responsibilities were increasing, while staffing levels had dramatically decreased.
8 TAC2000/ IP Telephony Lab Tools in This Book The Bash shell Perl Cfengine Regular expressions The grep command The sed stream editor AWK
9 TAC2000/ IP Telephony Lab Do You Need Automation? If you have only one system sitting on your desk at home, you can do everything manually. Many people do. Many people do. But, consider routine tasks such as Performing backups Performing backups Apply security updates Apply security updates Uninstall a package Uninstall a package If you have used RPM (RedHat Package Manager), you know how useful it is. Log file rotation Log file rotation See an example under /var/log The “logrotate” utility on Linux Database update Database update Run “updatedb” command periodically to generate most up-to-date “/var/lib/mlocate/mlocate.db” to be search by the command “locate”. All these tasks and more can happen quietly and automatically from within a standard UNIX or Linux system.
10 TAC2000/ IP Telephony Lab Do You Need Automation? (cont.) Automation is already a core part of UNIX philosophy, and cron jobs have historically been the de facto method for automating UNIX tasks. If a disk fills, set up a log- rotation script run from cron that deletes unneeded temporary files—whatever addresses the root cause. If a disk fills, set up a log- rotation script run from cron that deletes unneeded temporary files—whatever addresses the root cause. If a process dies, set up a process monitor to restart it when it exits. If a process dies, set up a process monitor to restart it when it exits. In later chapters, we will show you how to accomplish these tasks.
11 TAC2000/ IP Telephony Lab What Will You Gain? Saving Time Reducing Errors Documenting System Configuration Policies
12 TAC2000/ IP Telephony Lab What Do System Administrators Do? Tedious, repetitive tasks (a.k.a. boring tasks) New, innovative tasks (a.k.a. why you love the job) Answering users’ questions, or otherwise dealing with monitoring alarms, issues or emergencies (a.k.a. pulling your hair out) The goal of this class is to help you create new and innovative solutions to eliminate those tedious and repetitive tasks. Moreover, you will learn how to create a system that detects and fixes many problems before they come to the attention of the users.
13 TAC2000/ IP Telephony Lab Homework #1 Use VirtualBox to create a virtual machine on your desktop. If you have limited memory on your desktop PC, you may want to request a lower amount of memory (e.g. 256MB) for the virtual machine. If you have limited memory on your desktop PC, you may want to request a lower amount of memory (e.g. 256MB) for the virtual machine. Install CentOS 5.4 on it. Choose “Red Hat” as the OS type. Don’t choose 64-bit type. Choose “Red Hat” as the OS type. Don’t choose 64-bit type. Read some documents to know the difference between “find” and “locate”.