Package Management.

Slides:



Advertisements
Similar presentations
Linux Boot Loaders. ♦ Overview A boot loader is a small program that exists in the system and loads the operating system into the system’s memory at system.
Advertisements

Booting and Shuting Down WeeSan Lee. Roadmap Bootstrapping Boot Loaders Startup/Init Scripts Reboot & Shutdown Q&A.
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
Chapter 9: Understanding System Initialization The Complete Guide To Linux System Administration.
Week 8 System Initialization and X Windows. Objectives  Summarize the major steps necessary to boot a Linux system  Configure the LILO and GRUB boot.
Linux+ Guide to Linux Certification Chapter Nine System Initialization.
Linux Booting Procedure
Linux+ Guide to Linux Certification, Second Edition
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Booting the Linux Kernel Dr. Michael L. Collard 1.
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Second Edition
CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation.
Module 8 - Process Management. 1.Linux boot loader 2.Linux boot process 3.Linux processes 4.Linux services 5.Linux top 6.Remember proc ? 7.Linux Device.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Linux Intro Linux, the do it yourself OS Linux, successor to MINIX Linux, Unix for the masses (PC users) History:
1 Web Server Administration Chapter 3 Installing the Server.
Bootloader / multi-boot
Lesson 4-Installing Network Operating Systems. Overview Installing and configuring Novell NetWare 6.0. Installing and configuring Windows 2000 Server.
System Startup and Shutdown
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Linux Operations and Administration
Linux+ Guide to Linux Certification, Third Edition
CompTIA Linux+ Certification
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
2 © 2004, Cisco Systems, Inc. All rights reserved. IT Essentials I v. 3 Module 6 Windows NT/2000 Operating Systems.
Linux Installation and Administration – Lesson 5 Tutor: George Papamarkos Topic: Devices in Linux.
Hands-On Microsoft Windows Server 2008
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
LPIC-1 TRAINING COURSE Topic 102: Linux Installation and package management.
1 Linux Basics for Networking. 2 Module - Linux Basics for Networking ♦ Overview This module focuses on the basics of networking using Redhat Enterprise.
COSC 4750 Customizing and maintenance. Installing software Redhat/Fedora (and linux in general) has a package installer, called rpm Many programs will.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2010 by Scott Orr and the Trustees of Indiana University.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Guide to Linux Installation and Administration1 Chapter 4 Running a Linux System.
CIS Lesson 5 Lesson 5 New Skills Boot time GRUB edits (review) Changing BIOS boot order on a VM (review) Mounting CD ISO and floppy Image files on.
CHAPTER 2. Overview 1. Pre-Installation Tasks 2. Installing and Configuring Linux 3. X Server 4. Post Installation Configuration and Tasks.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
UNIX Startup and Shutdown CSCI N321 – System and Network Administration Copyright © 2000, 2009 by Scott Orr and the Trustees of Indiana University.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
RedHat Package Management RPM and YUM in RedHat Enterprise, Fedora, Suse and Centos.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
1 Setup and Compile Linux Kernel Speaker: Yi-Ji Jheng Date:
This slide deck is for LPI Academy instructors to use for lectures for LPI Academy courses. ©Copyright Network Development Group Module 10 Understanding.
Thousands of Linux Installations (and only one administrator) A Linux cluster client for the University of Manchester A V Le Blanc I T Services University.
Linux Introduction Linux was developed in the early 1990’s by Linus Torvald computer science student at the University of Helsinki Linux is distributed.
Chap- 2 BOOTING & SHUTDOWN LINUX SYSTEM Created by: Asst. Prof. Ashish Shah, J.M.PATEL COLLEGE, GOREGOAN W 1.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The GRUB bootloader Michael.
System Administration Startup Process. Why Care? ● Every process on your system comes about by following a specific chain of events from the machine startup.
The GRUB bootloader Michael Opdenacker Thomas Petazzoni Free Electrons
GRUB 2 Dave Soergel.
Operating System & Application Software
© 2002, Cisco Systems, Inc. All rights reserved.
Chapter Objectives In this chapter, you will learn:
Guide to Linux Installation and Administration, 2e
Package Management.
Linux Start Sequence Summary
Introduction to Operating System (OS)
Lecture 13 RPM and its advantages.
RedHat Package Management
CONFIGURING HARDWARE DEVICE & START UP PROCESS
Networking for Home and Small Businesses – Chapter 2
Booting Up 15-Nov-18 boot.ppt.
Lesson #7 MCTS Cert Guide Microsoft Windows 7, Configuring Chapter 7 Configuring Devices and Updates.
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Installing Linux Redhat:
COP 4343 Unix System Administration
SUSE Linux Enterprise Desktop Administration
Boot Process Mark Stanovich COP 5641 / CIS 4930.
Presentation transcript:

Package Management

About yum Front-end to rpm Designed to resolve package dependencies Can locate packages across multiple repositories Replacement for up2date

yum: Installation and Removal yum install package... yum localinstall rpmfile... yum groupinstall packagegroup... yum remove package... yum update [package...] .rpmnew versus .rpmsave

yum: Queries Searching packages yum search searchterm yum list (all|available|extras|installed|recent|updates [package_glob]) yum info packagename Searching files yum whatprovides filename

Configuring Additional Repositories Create a file in /etc/yum.repos.d/ for your repository, name ending in .repo, containing: [repo-name] name=A nice description baseurl=http://yourserver.com/path/to/repo enabled=1 gpgcheck=1 Repository information is cached. To clear the cache: yum clean dbcache|all

RPM Package Manager Under the hood of yum and RHN RPM Components Local database rpm and related executables or frontends Package files Primary Functions Install/Remove Query Verify

rpm: Installation and Removal Primary RPM options: Install: rpm -i, --install Upgrade: rpm -F, --freshen Upgrade or Install: rpm -U, --upgrade Removal: rpm -e, --erase Output options: -v, -h Many other install-options are available to address special cases: --replacepkgs, --oldpackage, etc. URL support: ftp:// (with globbing), http://

rpm: Queries Four basic types of queries: rpm -qa rpm -q package_name rpm -qf path_name rpm -qp package_file_path_name Types of information to query: -i general information about package -l list of files in package Many others

rpm: Verification Installed package file verification: rpm -V <package_name> rpm -Vp <package_file>.i386.rpm rpm -Va Signature verification BEFORE package install: rpm --import RPM-GPG-KEY-redhat-release rpm -K <package_file>.i386.rpm

Updating a Kernel RPM Make sure to install kernel updates yum handles this transparently with either update or install Do not use rpm -U or rpm -F ! Use rpm -i ! Updating a kernel yum update kernel Boot new kernel to test Revert to old kernel if a problem arises yum remove kernel-oldversion if no problems

System Initialization and Kernel Services

Boot Sequence Overview BIOS initialization Bootloader Kernel initialization init starts and enters desired run level by executing: /etc/rc.d/rc.sysinit /etc/rc.d/rc and /etc/rc.d/rc?.d/ /etc/rc.d/rc.local Virtual consoles X Display Manager if appropriate

Starting the Boot Process: GRUB Image selection Select with space followed by up/down arrows on the boot splash screen Argument passing Change an existing stanza in menu editing mode Issue boot commands interactively on the GRUB command line

Bootloader Components 1st Stage - small, resides in MBR or boot sector 2nd Stage - loaded from boot partition Minimum specifications for Linux: Title, kernel location, OS root filesystem and location of the initial ramdisk (initrd) Minimum specification for other OS: Title, boot device

GRUB and grub.conf GRUB “the GRand Unified Bootloader” Command-line interface available at boot prompt Boot from ext2/ext3, ReiserFS, JFS, FAT, minix, or FFS file systems Supports MD5 password protection /boot/grub/grub.conf Changes to grub.conf take effect immediately If MBR on /dev/hda is corrupted, reinstall the first stage bootloader with: /sbin/grub-install /dev/hda

Kernel Initialization Kernel boot time functions Device detection Device driver initialization Mounts root filesystem read only Loads initial process (init)

Run Levels init defines run levels 0-6, S, emergency The run level is selected by either Default in /etc/inittab at boot id:5:initdefault: Passing an argument from the bootloader Using the command init new_runlevel Show current and previous run levels /sbin/runlevel

rc Scripts /etc/rc.d/rc.sysinit System initialization Common to all run levels /etc/rc.d/rc # Executes S##servicename start from /etc/rc.d/rc#.d/ Symbolically linked to ../init.d/servicename /etc/rc.d/rc.local Runs near the end: S99local There is no stop

The xinetd service Manages transient services upon demand Less-frequently needed services Host-based authentication Service statistics and logging Service IP redirection Configuration files: /etc/xinetd.conf, /etc/xinetd.d/service

Controlling Services Utilities to control default service startup system-config-services: graphical utility that requires an X interface ntsysv: ncurses based utility usable in virtual consoles chkconfig: a fast, versatile command line utility that works well and is usable with scripts and Kickstart installations Utilities to control services manually service: immediately start or stop a standalone service chkconfig: immediately starts and stops xinetd-managed services

Kernel Images and Variants Architectures supported: x86, x86_64, IA64/Itanium, PowerPC64, s390x Three kernel versions available for x86: Regular: one or more processors but 4GB of RAM or less PAE: multiple processors and up to 16G of RAM Xen: needed for virtualization Kernels always installed under /boot/vmlinuz-*

Kernel Modules Modules are small kernel extensions that may be loaded and unloaded at will Can implement drivers, filesystems, firewall, and more Are located under /lib/modules/$(uname -r)/ Compiled for a specific kernel version and are provided with the kernel RPM Third party modules may be added

Kernel Module Utilities lsmod provides a list of loaded modules modprobe can load and unload modules modinfo displays information about any available module /etc/modprobe.conf used for module configuration: Parameters to pass to a module whenever it is loaded Aliases to represent a module name Commands to execute when a module is loaded or unloaded

The Chicken/Egg Module Problem and the Initial RAM Disk To mount the root filesystem, the kernel typically needs to load modules Examples: ext3, jbd, raid1, scsi_mod An initial RAM disk provides modules Compressed cpio archive containing modules, other material Created at install time Specific to a particular hardware and software platform Made available to the kernel by GRUB Use mkinitrd to rebuild mkinitrd /boot/initrd-$(uname -r).img $(uname -r)

Kernel Configuration With /proc /proc used to get or set kernel configuration Virtual filesystem: files not stored on hard disk Entries not persistent: modifications get reinitialized after a reboot Used to display process information, memory resources, hardware devices, kernel memory, etc. Can be used to modify network and memory subsystems or modify kernel features Modifications apply immediately

/proc Examples Read-only files: /proc/cpuinfo /proc/1/* /proc/partitions /proc/meminfo Read-Write entries under /proc/sys/: /proc/sys/kernel/hostname /proc/sys/net/ipv4/ip_forward /proc/sys/vm/drop_caches /proc/sys/vm/swappiness

sysctl : Persistent Kernel Configuration sysctl adds persistence to /proc/sys settings Statements added to /etc/sysctl.conf automatically processed during boot Configuration maintained or monitored using the sysctl command: List all current settings: sysctl -a Reprocess settings from sysctl.conf: sysctl -p Set a /proc value dynamically: sysctl -w net.ipv4.ip_forward=1

Managing /dev With udev udev manages files stored under /dev/ Files are only created if corresponding device is plugged in Files are automatically removed when device is disconnected udev statements under /etc/udev/rules.d/ determine: Filenames Permissions Owners and groups Commands to execute when a new device shows up

Exploring Hardware Devices A snapshot of all connected devices is maintained by HAL: Hardware Abstraction Layer hal-device lists all devices in text mode hal-device-manager displays all devices on a graphical window lspci and lsusb list devices connected to the PCI and USB buses, respectively The /proc and /sys filesystems also contain bus and device specific information