0% found this document useful (0 votes)
139 views33 pages

Management of RPM Packages: Week 3 Unit 1

Uploaded by

Adyhincu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views33 pages

Management of RPM Packages: Week 3 Unit 1

Uploaded by

Adyhincu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Week 3 Unit 1:

Management of RPM Packages


Management of RPM Packages
RPM Basics

RPM is made up of several components:


o RPM database
• Contains information on all installed RPM packages
• Keeps track of all files that are changed and created when a user installs an RPM
• Works in the background of the package manager
o RPM package manager
• Utility that handles installing and uninstalling RPM packages
o RPM package
• Software packaged for easy installation onto a SUSE Linux Enterprise Server

open.sap.com Slide 2
Management of RPM Packages
RPM Package Components

An RPM package includes the following parts:


o Informational header – a package label that contains information about the software to be
installed
o GPG signature – a key signature to validate the integrity and source of the package
o CPIO archive – all the files of the package are compressed in a CPIO archive
o Installation scripts - Sometimes it is necessary to do some modifications to the system before
and/or after the installation of the package; this can be done by pre- and post installation scripts

Header Signature

CPIO Scripts

open.sap.com Slide 3
Management of RPM Packages
RPM Names

SUSE Linux Enterprise Server RPMs follow a naming convention:

o Software name – the name of the package


o Software version – the versions of the software contained in the package
o Release number – the release number of the software version in the package
o Architecture – the hardware architecture the software is compiled for

open.sap.com Slide 4
Management of RPM Packages
Installation of RPMs

An RPM can be installed with the rpm command:


o rpm -i <package.rpm>
• Installs the package
o rpm -u <package.rpm>
• Installs or updates an already installed package
o rpm -f <package.rpm>
• Reinstalls or updates an already installed package
• A version of the package must already be installed

An RPM can also be uninstalled with the rpm command:


o rpm -e <package>

open.sap.com Slide 5
Management of RPM Packages
RPM Database Query

The RPM database contains useful information and can be queried:

Option Description
rpm -q Query the RPM database
rpm -qp Inspect a package that is not yet installed

The following query options are often used with the -q and -p options:

Option Description
rpm -qa List all installed packages
rpm -qi List package information
rpm -ql (lowercase L) Display file list
rpm -qf Which package does the specified file (with full path) belong to
rpm -qd List only documentation files (-l is implied)
rpm -qc List only configuration files (-l is implied)
open.sap.com Slide 6
Management of RPM Packages
Additional RPM Database Queries

Option Description
--dump Display a file list with complete details
Used with -l, -c or -d
--provides List features of the package that another package can request with
--requires
--requires, -R List capabilities the package requires
--scripts List installation scripts (pre-install, post-install, and uninstall)
--changelog Display detailed list of information about a specific package,
specifically about updates and modifications, etc.

open.sap.com Slide 7
Management of RPM Packages
RPM Package Verification

RPMs can be verified to ensure integrity using the rpm -V and rpm --checksig commands:
o rpm -- checksig <package.rpm>
o rpm -V <package>
• Return codes give insight on what has changed per file:
Code Description
S List package information
M Mode has changed
5 Size is different
D Device major/minor numbers are different
L Readlink (symbolic link) path mismatch
U User ownership differs
G Group ownership differs
T mtime (modified time) differs
P Capabilities differ
open.sap.com Slide 8
Copyright © SUSE LLC

© 2019 SUSE LLC. All rights reserved. SUSE and the SUSE logo are registered trademarks of SUSE
LLC in the United States and other countries. All third-party trademarks are the property of their
respective owners.

open.sap.com Slide 9
Thank You!

Contact Information:
open@sap.com
Week 3 Unit 2:
Software Management with libzypp
Software Management with libzypp
libzypp Overview

libzypp is a package manager: a library and set of utilities that allow for package management on
Linux systems.
o Built upon SAT solver, a library to resolve package dependencies
o Supports various software repository types
o Supports signed repositories, delta packages, and package updates

Files on the system RPM libzypp

open.sap.com Slide 2
Software Management with libzypp
Software Repositories

What is a software repository?


o Directories that contain RPM software packages and meta-data files
o Can be accessed by RPM package managers
o Can be accessed from different media and local file systems
• DIR
• HD
• ISO
• DVD
• etc.
o Can be accessed via various network protocols
• NFS
• FTP
• HTTP(S)
• SMB/CIFS

open.sap.com Slide 3
Software Management with libzypp
The 4 “P”s of libzypp

libzypp categorizes the contents of a repository into one of 4 “P”s:


o Packages
• RPM packages (including patch/delta RPMs)
• Contain files to be installed on the filesystem
o Patterns
• Reference 1 or more packages
• Typically install all packages needed for a certain server “role”
o Products
• Contain 1 or more patterns
• Associated with a product with its own support and maintenance
o Patches
• Reference 1 or more update packages (packages provided as both full and patch/delta RPMs)

open.sap.com Slide 4
Software Management with libzypp
libzypp Utilities

libzypp is a backend to several utilities that provide installation and/or update functionality for RPMs
o YaST – use a graphical, ncurses, or non-interactive interface to install or upgrade packages
o PackageKit – use a graphical, desktop toolkit for package updates
o zypper – a command-line tool for software management

o YaST PackageKit zypper

Files on the system RPM libzypp

open.sap.com Slide 5
Software Management with libzypp
Terms Recap

Term Description

Repository A local or remote directory containing packages and metadata

Product Represents a whole product

Pattern An installable group of packages dedicated to a certain purpose

Package A compressed file in RPM format that contains the files for a particular program

Patch Consists of one or more packages and may be applied by means of delta RPMs

Delta RPM Consists only of the binary differences between two defined versions of a
package

Package Dependencies Certain packages are dependent on other packages

open.sap.com Slide 6
Software Management with libzypp
Using zypper - Repositories

The zypper utility, used from the command line, allows you to manage repositories , as well as
packages, patches, products, and patterns.
o List software repositories:
• zypper lr
o Add a repository:
• Zypper ar <uri> <alias>
o Modify repositories:
• zypper mr [options] <alias|#|uri>

open.sap.com Slide 7
Software Management with libzypp
Using zypper - Packages

zypper also is commonly used to manage packages:


o List and search:
• zypper se <string>
o Display package information:
• zypper if <package>
o Install package:
• zypper in <package>
o Remove package:
• zypper rm <package>

open.sap.com Slide 8
Software Management with libzypp
Managing Repositories and Software with YaST

YaST can perform the same repository and software functions as zypper from a graphical or ncurses-
based interface:

open.sap.com Slide 9
Copyright © SUSE LLC

© 2019 SUSE LLC. All rights reserved. SUSE and the SUSE logo are registered trademarks of SUSE
LLC in the United States and other countries. All third-party trademarks are the property of their
respective owners.

open.sap.com Slide 10
Thank You!

Contact Information:
open@sap.com
Week 3 Unit 3:
Network Management with SLES
Network Management with SLES
Networking Terms

Term Description

Device Network adapter found on the system

Interface Software component creating an interface to a physical device

Link Connection of a device to the network

Address IP address assigned to an interface

Broadcast Address to reach all hosts on the local network

Route Path a network packet takes from the source to the destination
host

open.sap.com Slide 2
Network Management with SLES
Network Related Configuration Files

For each interface used on a SUSE Linux Enterprise Server machine, a configuration file will be
created and stored in the /etc/sysconfig/network/ directory. Each file contains configuration
information that can be easily viewed or changed.

Name resolution is configured via multiple files:


o System’s hostname: /etc/hostname
o Local name resolution: /etc/hosts
o DNS servers: /etc/resolv.conf
o Order of name resolution services: /etc/nsswitch.conf
open.sap.com Slide 3
Network Management with SLES
SUSE sysconfig Network Commands

SLES has several commands for viewing or changing the status of an interface. Each command has a
syntax of: <command> <interface>
o Bring a configured network interface up:
• ifup eth0
o Bring a configure network interface down:
• ifdown eth0
o Display information about a configured network interface:
• ifstatus eth0

open.sap.com Slide 4
Network Management with SLES
Network Configuration with YaST

Within the YaST lan module, an administrator can configure network interfaces, bridges, hostnames,
DNS servers, etc. The same functions can be performed in the ncurses version of YaST.

open.sap.com Slide 5
Network Management with SLES
The ip Command

The ip command can be used to temporarily change network settings, including ip addresses,
network bridge creation, routing, etc. Any changes made with ip will not be saved to configuration
files.
o Syntax:
• ip [address|addr|a] <task> <arguments>
o Display IP address configuration:
• ip addr show (or ip a s )
o Add an IP address to an interface:
• ip addr add 10.0.0.10/24 brd + dev eth0
o Remove an IP address from an interface:
• ip addr del 10.0.0.10/24 dev eth0
o Add a default route:
• Ip route add default via 172.17.2.2

open.sap.com Slide 6
Network Management with SLES
Network Management Tools

Many tools used for network management in SUSE Linux Enterprise Server share common functions found
on other operating systems, such as ping and traceroute:
o ping – use an ICMP packet to verify reachability of a remote host
Option Description
-c count Number of packets to be sent
-I Network interface to be used (uppercase i)
-i seconds Number of seconds to wait between packets
-f Packets are sent are sent at the same rate as replies
-l preload Send packets without waiting for a reply
-b Send packets to the network broadcast address
-t ttl Time To Live for packets to be sent
o traceroute – display route taken to a remote network or host
• Uses UDP (datagrams)
• -n option displays IP addresses instead of FQDN (Fully Qualified Domain Name)

open.sap.com Slide 7
Network Management with SLES
firewalld Basics

Firewall is a term used to describe a mechanism that controls the data flow between networks. When
mentioned in this section we mean a packet filter.
firewalld is a daemon that maintains the system’s iptables rules and offers an interface for
operating on them.
o iptables – a rule-based firewall included in the Linux kernel since the 2.4 release
o firewall-cmd – a command line utility for interacting with firewalld
o firewall-config – a graphical user interface for interacting with firewalld

open.sap.com Slide 8
Network Management with SLES
Security Zones

firewalld implements different security zones. Several zones are predefined, but the administrator can
define custom zones if desired.
o Each zone contains its own set of iptables rules
o Each network interface is a member of exactly one zone
o Connections can also be assigned to a zone based on the source addresses
o Each zone represents a level of trust
• A host can, therefore, offer different services based on trusted or untrusted networks in a defined way

open.sap.com Slide 9
Network Management with SLES
firewalld Configurations

firewalld has two separate configurations:


o Runtime – represents the currently active rules
• Allows for temporary rules that can be discarded after firewalld is restarted
• Allows for experimentation with new rules while being able to revert
o Permanent – represents the saved rules that will be applied when restarting firewalld

open.sap.com Slide 10
Copyright © SUSE LLC

© 2019 SUSE LLC. All rights reserved. SUSE and the SUSE logo are registered trademarks of SUSE
LLC in the United States and other countries. All third-party trademarks are the property of their
respective owners.

open.sap.com Slide 11
Thank You!

Contact Information:
open@sap.com

You might also like