CP 211: Introduction to Linux/Unix Systems Lecture 1: Introduction to System Administration Course Description This course is designed for students to build their theoretical and practical skills in systems administration on Unix/Linux to a level where they can configure and manage workstations. ● ● This course will be handled by two instructors: Course Objective The main objective of this course is to introduce students to the task of system administration, looking after and maintaining linux/unix based systems. ● Learning Outcomes Upon completion of this course, students should be able: – Perform systems installation of UNIX or Linux operating – Perform basic configuration and maintenance of UNIX/Linux systems – Write simple shell scripts Mode of Delivery 40 Lecture hours + 20, tutorial/seminar hours 10 Assignment hours, 20 independent study hours and 10 practical training hours. ● Course Contents ● Introduction to System Administration, Roles and responsibilities ● Background of LINUX, variation of LINUX Managing Users: Group, Individual, Process: Adding, Deleting, Modifying User Attributes, Password, The Login Process,/etc/profile and .profile. ● File System: Structure, File and Directory, Shared File & Directory, Process: create, delete, rename file and directory, vi Editor ● Shell Scripting: Shell Programming, Example scripting, Advanced Scripting ● Backup & Recovery: Backup Strategies, Essential Tools, tar, cpio and dump command, network Backup Strategies ● ● Security Recommended References/Textbooks: Nicholas Well, The Complete Guide to Linux System Administration, Thomas Course Technology, 2005 ● Overview of Operating Systems What is an Operating System? An Operating System (OS) is a program that acts as an intermediary between the user and the hardware Operating system goals: • Execute user programs and make solving user problems easier • Make the computer system convenient to use • Use the computer hardware in an efficient manner 9 Operating System Services 1. Program execution The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error) 2. I/O Operations Each program requires an input and produces output. This involves the use of I/O. The operating systems hides the user the details of underlying hardware for the I/O. All the user sees is that the I/O has been performed without any details. So the operating system by providing I/O makes it convenient for the users to run programs. Operating System Services 3. File System Manipulation The output of a program may need to be written into new files. The user does not have to worry about secondary storage management. User gives a command for reading or writing to a file and sees his task accomplished. Thus operating system makes it easier for user programs to accomplish their task. 4. Communications Processes may exchange information, on the same computer or between computers over a network. Operating System Services 5. Error detection – Os needs to be constantly aware of possible errors • May occur in the CPU and memory hardware, in I/O devices, in user program • For each type of error, OS should take the appropriate action to ensure correct and consistent computing • Debugging facilities can greatly enhance the user’s and programmer’s abilities to efficiently use the system 6. Resource allocation – When multiple users or multiple jobs running concurrently, resources must be allocated to each of them • Many types of resources - CPU cycles, main memory, file storage, I/O devices. Operating System Services 7. Protection and security – The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other • Protection involves ensuring that all access to system resources is controlled • Security of the system from outsiders requires user authentication, extends to defending external I/O devices from invalid access attempts Modern OS Architectures - Android Modern OS Architectures – Windows 10 Modern OS Architectures – MacOS Market Share Market Share Market Share Public servers on the Internet Market Share Supercomputers What is system administration? In computer technology, a set of functions that provides support services, ensures reliable operations, promotes efficient use of the system, and ensures that prescribed service-quality objectives are met. ➔ It plays a vital role when a system is accessed by multiple users. ➔ In essence, system administration is used to ascertain that there is little to complain about the system’s performance or service availability. ➔ Systems Administration The subject matter of systems administration includes computer systems and the ways people use them in an organization. ➔This entails a knowledge of operating systems and applications, as well as hardware and software troubleshooting, but also knowledge of the purposes for which people in the organization use the computers. ➔ A system Administrator A job position of engineers involved in computer systems. They are the people responsible for running the system, or running some aspect of it. ➔ A system administrator, or sysadmin , is responsible for the installation, configuration, monitoring and assurance of an IT infrastructure. ➔ This infrastructure is usually composed of computer networks with hardware, such as switches, routers, servers and workstations, and software running on them, such as firewalls, databases and web servers. ➔ Types of Administrators In a larger company, the following administrators may all be separate positions within a computer support or Information Services (IS) department. In a smaller group they may be shared by a few sysadmins, or even a single person. Database Administrator ●Network Administrator ●Security Administrator ●Web Administrator ●Technical support ●Computer operator ● Types of Administrators Types of Administrators A database administrator (DBA) maintains a database system, and is responsible for the integrity of the data and the efficiency and performance of the system. A network administrator maintains network infrastructure such as switches and routers, and diagnoses problems with these or with the behavior of network-attached computers. A security administrator is a specialist in computer and network security, including the administration of security devices such as firewalls, as well as consulting on general security measures. Types of Administrators A web administrator maintains web server services (such as IIS or Apache) that allow for internal or external access to web sites. Tasks include managing multiple sites, administering security, and configuring necessary components and software. Responsibilities may also include software change management. Technical support staff respond to individual users' difficulties with computer systems, provide instructions and sometimes training, and diagnose and solve common problems. A computer operator performs routine maintenance and upkeep, such as changing backup tapes or replacing failed drives in a RAID array. Such tasks usually require physical presence in the room with the computer; and while less skilled than sysadmin tasks require a similar level of trust, since the operator has access to possibly sensitive data. Challenges of system administration ● Designing a network which is logical and efficient. Deploying large numbers of machines which can be easily upgraded later. ● ● Deciding what services are needed. ● Planning and implementing adequate security. ● Providing a comfortable environment for users. Developing ways of fixing errors and problems which occur. ● Keeping track of and understanding how to use the enormous amount of knowledge which increases every year. ● The meta principles of system administration Principle 1 (Policy is the foundation). System administration begins with a policy – a decision about what we want and what should be, in relation to what we can afford. Principle 2 (Predictability). The highest level aim in system administration is to work towards a predictable system. Predictability has limits. It is the basis of reliability, hence trust and therefore security. The meta principles of system administration Principle 3 (Scalability). Scalable systems are those that grow in accordance with policy; i.e. they continue to function predictably, even as they increase in size. Essential duties of a system administrator Controlling access: creates accounts for new users, removes the accounts of inactive users, and handles all the account-related issues that come up in between (e.g., forgotten passwords and lost key pairs) Adding hardware: Administrators who work with physical hardware must install it and configure it to be recognized by the operating system Essential duties of a system administrator Automating tasks: Using tools to automate repetitive and time-consuming tasks increases your efficiency, reduces the likelihood of errors caused by humans, and improves your ability to respond rapidly to changing requirements. Overseeing backups: Backing up data and restoring it successfully when required are important administrative tasks Essential duties of a system administrator Installing and upgrading software: Software must be selected, installed, and configured, often on a variety of operating systems. As patches and security updates are released, they must be tested, reviewed, and incorporated into the local environment without endangering the stability of production systems. Essential duties of a system administrator Monitoring: Working around a problem is usually faster than taking the time to document and report it, and users internal to an organization often follow the path of least resistance. External users are more likely to voice their complaints publicly than to open a support inquiry Troubleshooting: Networked systems fail in unexpected and sometimes spectacular fashion. It’s the administrator’s job to play mechanic by diagnosing problems and calling in subject-matter experts as needed. Finding the source of a problem is often more challenging than resolving it. Essential duties of a system administrator Maintaining local documentation: Administrators choose vendors, write scripts, deploy software, and make many other decisions that may not be immediately obvious or intuitive to others. Thorough and accurate documentation is a blessing for team members who would otherwise need to reverse-engineer a system to resolve problems in the middle of the night. Essential duties of a system administrator Tuning performance: UNIX and Linux are general purpose operating systems that are well suited to almost any conceivable computing task. Administrators can tailor systems for optimal performance in accord with the needs of users, the available infrastructure, and the services the systems provide Essential duties of a system administrator Developing site policies: For legal and compliance reasons, most sites need policies that govern the accept able use of computer systems, the management and retention of data, the privacy and security of networks and systems, and other areas of regulatory interest. System administrators often help organizations develop sensible policies that meet the letter and intent of the law and yet still promote progress and productivity. Essential duties of a system administrator Working with vendors: Most sites rely on third parties to provide a variety of ancillary services and products related to their computing infrastructure. Administrators may be tasked with selecting vendors, assisting with contract negotiations, and implementing solutions once the paperwork has been completed. Essential duties of a system administrator Fire fighting: Although helping other people with their various problems is rarely included in a system administrator’s job description, these tasks claim a measurable portion of most administrators’ workdays. System administrators are bombarded with problems ranging from “It worked yesterday and now it doesn’t! What did you change?” to “I spilled coffee on my keyboard! Should I pour water on it to wash it out?” Can you summarize the duties of Systems Administrators into two basic jobs/duties? Required Skills and Qualities Hard skills ●Must be an expert hardware and software tinkerer ● Comfortable in multiple Oses ● Install and configure server and client software Know how networks work and how computers communicate ● ● Script programming ● Leveraging the Internet for information Required Skills ● Hard Skills –Linux, Windows, OS X, Solaris, Perl, PHP, JavaScript, HTML, XML, CSS, AJAX, Active Directory, SQL, Amanda, TCP/IP, HTTP, SMTP, IMAP, POP, SVN, CVS, LDAP, DNS, DHCP, SSH, SFTP, FTP, SSL, Java, Apache, Tomcat, MySQL, PostgreSQL, RRT, Cricket, Nagios, Samba, SMB, BOOTP, IPMI, PXE, Python, sh, bash, csh, MPI, SGE, Globus, Grid, Cluster, CUPS, LPR, DFS, EXT3, Reiser, XFS, JFS, Squid, iptables, IBRIX, Infiniband, Ethernet, DVI, USB, PCI, PCI-X, PCIe, DIMM, CMOS, BIOS, ISO, IIS, Postfix, sendmail, dovecot, courierimap, scp, df, du, top, uptime, find, tar, tail, less, grep, ls, vi, emacs, ps, man, which, crontab, cp, dump, more, ruby, c, c++, sed, awk, proc, postscript, pdf, latex, drupal, plone, modprobe, regedit, group policy, ping, route………. The point is, you obviously can’t learn all of these, so focus on getting a good foundation and being able to learn new things quickly. ● Required Skills Soft Skills ●Be an excellent communicator –Written –Verbal –Communicating technical information clearly and concisely is extremely hard! ● Adaptability –The landscape is constantly changing. Stay ahead of the curve by keeping track of current development, maintaining current training, and trying new things. Required Skills Soft Skills ●Tolerance, Patience and Compassion –End –Put ● users can be difficult and unreasonable yourself in their shoes Self-Motivating –Often, the only time you hear from users is when there’s something wrong. The best ones remember to praise you when things go right, but don’t rely on it for motivation ● Creativity –Ability to think outside the box and come up with creative solutions to problems Successful System Admins Generalize. –They become a Jack-of-all-Trades. They don’t get trapped in a specific technology or product. ● Are expert problem solvers. –They understand how to attack the unknown in manageable, measured steps. ● Are very good at time management. –They manage information and workflow effectively. ● Successful System Admins Think ahead. –Put monitoring systems in place before the problem exists. Identify bottlenecks and weaknesses and address them. ● Solve a problem once. –Build a permanent solution, not a one-time hack job. “Higher Order Administration” ● ● Are often outgoing, social people