Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
open.sap.com Slide 2
Flavors of SUSE Linux
openSUSE
open.sap.com Slide 3
Flavors of SUSE Linux
Why openSUSE?
open.sap.com Slide 4
Flavors of SUSE Linux
SUSE Linux Enterprise Server (SLES)
open.sap.com Slide 5
Flavors of SUSE Linux
Relationship between openSUSE and SLES
openSUSE
Leap 15.1
SUSE Linux Enterprise Server
openSUSE
Leap 15
Binary Code Base
openSUSE
Leap 42.3 IBM System z IBM POWER X86_64
open.sap.com Slide 6
Flavors of SUSE Linux
SLES Maintenance Model
open.sap.com Slide 7
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 8
Thank You!
Contact Information:
open@sap.com
Week 1 Unit 2:
Introduction to YaST
Introduction to YaST
What is YaST?
YaST (Yet another Setup Tool) is a local system configuration tool for Linux, most prominently used by
SUSE Linux Enterprise Server and openSUSE
Using YaST, you can configure the network, storage devices, software, and most network services
shipped as part of SLES.
YaST has four user interfaces:
o Command line non-interactive
• Example: yast -i vim
o Command line interactive
• Example: yast lan interactive
o Graphical
o Non-graphical (ncurses)
The appearance of the user interface depends on which command you use to start YaST
open.sap.com Slide 2
Introduction to YaST
Starting YaST - Graphical
open.sap.com Slide 3
Introduction to YaST
Starting YaST – Command Line
o List modules: yast -l or yast --list, then start YaST with the module:
open.sap.com Slide 4
Introduction to YaST
Starting YaST – Where you start YaST matters
When using interactive YaST, there are two different commands (from a command line) to
start it, each with different possible results depending on where you typed the YaST
command:
o yast – always launches the ncurses interface
o yast2 – can launch the graphical or ncurses interface depending on the location where the
command is called from
open.sap.com Slide 5
Introduction to YaST
Graphical YaST
open.sap.com Slide 6
Introduction to YaST
Non-Graphical YaST
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 1 Unit 3:
The SLES Unified Installer
The SLES Unified Installer
What is the Unified Installer?
SUSE Linux Enterprise Server is installed through the use of the Unified Installer
Previous versions of SLES had separate installation media for each sub-product
The Unified Installer allows several different products to be installed from a single installation medium,
despite having only one relatively small .iso (less than 670MB)
open.sap.com Slide 2
The SLES Unified Installer
Unified Installer Product Options
Upon starting the Unified Installer, the first screen you are presented with after booting
allows you to choose the product you wish to install.
Your options are:
o SUSE Linux Enterprise Server 15 SP1
o SUSE Linux Enterprise High Performance Computing 15 SP1
o SUSE Linux Enterprise Real Time 15 SP1
o SUSE Linux Enterprise Server for SAP Applications 15 SP1
o SUSE Linux Enterprise Desktop 15 SP1
o SUSE Manager Server 4.0
o SUSE Manager Proxy 4.0
o SUSE Manager Retail Branch Server 4.0
Note that you will need a registration code for the product
you select
open.sap.com Slide 3
The SLES Unified Installer
Access to Packages
When installing via the installation medium, only a minimal command line based system can be
installed, unless:
o The system being installed has connectivity to SUSE Customer Center (SCC)
o The system being installed has connectivity to a Repository Mirroring Tool (RMT)
o The second .iso has been downloaded, SLE-15-Packages, and is made available during the
installation
open.sap.com Slide 4
The SLES Unified Installer
Add On Product
A minimal installation of SUSE Linux Enterprise Server with no additional software selected
is of limited use.
• In order to add functionality to your product, select a module or extension that matches
your needs
• All products listed in the Extensions and Modules Selection screen have dependencies on
at least the Basesystem Module, with other dependencies likely
open.sap.com Slide 5
The SLES Unified Installer
Installation Summary
open.sap.com Slide 6
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 7
Thank You!
Contact Information:
open@sap.com
Week 1 Unit 4:
SLES Modules and Extensions
SLES Modules and Extensions
SLES Modules
open.sap.com Slide 2
SLES Modules and Extensions
SUSE Linux Enterprise Server Extensions
• SLES extensions provide advanced capabilities for tasks, such as live patching and high
availability clustering
• Extensions are offered as subscriptions and require a registration key that is liable for costs
• Extensions usually have their own release notes that are available from
https://www.suse.com/releasenotes
• The currently available extensions are:
o SUSE Linux Enterprise High Availability Extension
o SUSE Linux Enterprise Live Patching
o SUSE Enterprise Storage
o SUSE Linux Enterprise Workstation Extension
open.sap.com Slide 3
SLES Modules and Extensions
Installing Modules and Extensions
Modules and Extensions can be installed when initially setting up the system, and also on an existing
SUSE Linux Enterprise Server Installation
• For an new installation:
o The steps are part of the installation routine
o Either network access to SCC or SMT/RMT, or offline with additional installation media
• For an existing installation:
o Launch the YaST module Add System Extensions or Modules and follow instructions
open.sap.com Slide 4
SLES Modules and Extensions
Extension Detail: High Availability Extension
SUSE Linux Enterprise High Availability Extension is an integrated suite of open source
technologies that enables you to implement highly available physical and virtual Linux
clusters.
• High availability clustering is used to automate application and data recovery
• Flexible policy-driven clustering solution to eliminate single points of failure
• Servers are continuously monitored; workloads are transferred when faults or failures
occur
open.sap.com Slide 5
SLES Modules and Extensions
Extension Detail: Live Patching
Using SUSE Linux Enterprise Live Patching, you can apply patches to your Linux kernel
without rebooting your system.
• Your applications keep running while you patch the Linux kernel with critical updates
• Maximize uptime for a wide range of systems and applications
open.sap.com Slide 6
SLES Modules and Extensions
Extension Detail: Enterprise Storage
open.sap.com Slide 7
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 8
Thank You!
Contact Information:
open@sap.com
Week 2 Unit 1:
The Filesystem Hierarchy Standard (FHS)
The Filesystem Hierarchy Standard (FHS)
The Linux Standards Base (LSB) and the FHS
The Filesystem Hierarchy Standard (FHS) is part of the Linux Standards Base. It includes the
following information:
• Which directories must be located on the first level and what they contain
• Defines a two-layer hierarchy
o What’s under the top layer (root or “/”)
o What’s under /usr and /var
The FHS includes the following design factors:
o Compartmentalization – by separating out components of the filesystem, gain security and
order
o Writability – where can users and processes safely store files
o Shareability – who can access what, with and without changes to default permissions
open.sap.com Slide 2
The Filesystem Hierarchy Standard (FHS)
FHS First Layer
/
bin sbin lib lib64 etc usr opt root boot home run mnt var srv tmp dev sys proc
open.sap.com Slide 3
The Filesystem Hierarchy Standard (FHS)
FHS Second Layer - /usr
/
bin sbin lib lib64 etc usr opt root boot home run mnt var srv tmp dev sys proc
bin
sbin
lib
include
share
local
src
/usr/bin – most executables
/usr/sbin – system admin programs
/usr/lib – libraries and application directories
/usr/share – documentation and man pages
/usr/local – locally installed programs
/usr/src – source code for kernel and programs
open.sap.com Slide 4
The Filesystem Hierarchy Standard (FHS)
FHS Second Layer - /var
/
bin sbin lib lib64 etc usr opt root boot home run mnt var srv tmp dev sys proc
lib
lock
/var/lib – variable libraries, like databases spool
/var/lock – lock files for multiuser access run
open.sap.com Slide 5
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 6
Thank You!
Contact Information:
open@sap.com
Week 2 Unit 2:
Linux File Types
Linux File Types
The Seven File Types
open.sap.com Slide 2
Linux File Types
File Types: Normal Files and Directories
• Normal files
o Sets of data addressed with one name
o Examples:
• ASCII text files
• Executable files
• Graphics files
• Directories
o Organize files on the disk
o Contain files and/or subdirectories
o Implement the hierarchical file system
open.sap.com Slide 3
Linux File Types
File type: Introduction to Links
• Hard Links
o Secondary file names for files
o Multiple file names referencing a single inode
o Referenced file must reside on the same filesystem FileB FileA
• Symbolic Links
o References to other files on the system (or over the network)
o The inode contains a reference to another file name
o Referenced files can exist in the same filesystem or in another filesystem
o A symbolic link (sometimes called soft) can reference a non-existent file (broken link)
FileB FileA
open.sap.com Slide 4
Linux File Types
File type: Links Visualized
Filesystem
(inodes)
Data
Volume 1 Volume 2
open.sap.com Slide 5
Linux File Types
File type: Sockets and Pipes
• Sockets
o Logical endpoint for communication between processes
o Used for two-way communication
open.sap.com Slide 6
Linux File Types
File type: Device Files
Device files are automatically created by a system tool called udev. There are tools for and
circumstances when manual creation of device files is necessary.
open.sap.com Slide 7
Linux File Types
File type: Block Device Files
Device Name
First primary partition on the first drive /dev/sda1
Second primary partition or an extended /dev/sda2
partition on the first drive
First primary partition on the third hard drive /dev/sdc1
First logical partition on the first hard drive /dev/sda5
Second logical partition o the first hard drive /dev/sda6
open.sap.com Slide 8
Linux File Types
File type: Block Device Files
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 2 Unit 3:
User Management
User Management
User ID (UID) and Group ID (GID)
Since operating systems handle numbers better than strings, users and groups are administered as
numbers:
• The User ID, or UID, is the number representing a user
o 0: root
o 1 – 99: System
o 100 – 499: System accounts
o ≥ 1000: Normal (unprivileged) accounts
• The Group ID, or GID, is the number representing a group (with users as members)
o 0: root
o 1 – 99: System groups
o 100 – 499: Dynamically allocated system groups
o ≥ 1000: Normal groups
open.sap.com Slide 2
User Management
User and Group Information: CLI
• There are several tools for viewing user and group information from a command line or shell:
o whoami: who is executing this command
server1:~> whoami
tux
o id <user> : list uid, gid and any groups the user is in
server1:~> id tux
uid=1000(tux) gid=100(users) groups=100(users)
o groups : list the groups the user is a member of
server1:~> groups tux
tux : users
open.sap.com Slide 3
User Management
User and Group Database Files
open.sap.com Slide 4
User Management
Contents of /etc/passwd
open.sap.com Slide 5
User Management
Contents of /etc/shadow
open.sap.com Slide 6
User Management
Contents of /etc/group
open.sap.com Slide 7
User Management
Managing Users and Groups from the Command Line
• Users and groups can be managed via the command line (shell) or through YaST.
Command Description
open.sap.com Slide 8
User Management
Managing Users and Groups from YaST
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 2 Unit 4:
Filesystem Permissions
Filesystem Permissions
Identifying File and Directory Permissions
File and directory permissions and ownership are easily identified from the command line:
o Using the ls –l command, we get something similar to the following:
Modification time
Ownership
File name
File size
open.sap.com Slide 2
Filesystem Permissions
Permissions Explained
Permissions in Linux (and other Unix-like operating systems) use a mode system:
• Files
o Read (r) – File can be opened and read
o Write (w) – File can be modified (but not deleted) -rwxrwxrwx
o Execute (x) – File can be executed (run as a program or script)
• Directories
o Read (r) – Directory contents can be viewed
o Write (w) – Directory contents can be modified (i.e. files can be deleted)
o Execute (x) – Directory can be entered (cd into or through directory)
drwxr-x---
open.sap.com Slide 3
Filesystem Permissions
User Group Other
The permissions are listed by User, Group, and Other (meaning everyone else).
User
• The user that has ownership of a file can be given read
(r), write (w), or execute (x) permissions to the file
Other
• The group that has ownership can also be given read,
write or execute permissions
open.sap.com Slide 4
Filesystem Permissions
Binary and Octal Permission Notation
Permissions in Linux can also be expressed in Binary and Octal notation. Binary notation is rarely
used for anything other than calculation.
o Read = 4 in octal notation
o Write = 2 in octal notation
o Execute = 1 in octal notation
open.sap.com Slide 5
Filesystem Permissions
Modifying File and Directory Modes and Ownership
Permissions in Linux are referred to as the mode and there are tools to change the mode, as well as
the owner and group owner of a file or directory:
o chmod – Change mode
• Can use the regular (rwx) notation or the octal notation
open.sap.com Slide 6
Filesystem Permissions
umask
When a file or directory is created in Linux, default permissions are set. Using the umask, an
administrator can limit specifically (via subtraction) what permissions are granted to the user, group
and all others.
Default 666
• Files:
umask 022
Result 644
Default 777
• Directories umask 022
Result 755
open.sap.com Slide 7
Filesystem Permissions
Sticky Bit
In addition to the standard read, write, and execute permissions, there are three others: the sticky bit,
SGID, and SUID.
• Sticky bit
o Files: Not applicable
o Directories: A user can only delete files in the directory when the user is root or the owner of the
directory
o There is special notation for the sticky bit:
User Group Other
rwx rwx rwt
rwT
001 111 111 111
110
1 7 7 7
6
open.sap.com Slide 8
Filesystem Permissions
Set Group ID (SGID)
open.sap.com Slide 9
Filesystem Permissions
Set User ID (SUID)
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
Week 2 Unit 5:
Privilege Delegation
Privilege Delegation
Switching Identities
SUSE Linux Enterprise Server administrators frequently need to change system identities in order to
perform daily tasks. There are multiple tools for performing this switch.
o su – Substitute user
• The “-” option gives you a login shell (e.g. su -)
• Execute a single command as a user with the -c option (e.g. su -c “grep tux /etc/shadow”)
open.sap.com Slide 2
Privilege Delegation
sudo
SUSE Linux administrators will also frequently use the sudo command. Originally it meant “superuser
do”, but has more recently been changed to “substitute user do”.
o sudo – switch to another user (default is root) and perform a task
o On SUSE Linux Enterprise Server, the root password is required by default
• This behavior is different from most other Linux distributions
• Can be changed to the user’s password in the /etc/sudoers file
open.sap.com Slide 3
Privilege Delegation
sudo’s Configuration File: /etc/sudoers
open.sap.com Slide 4
Privilege Delegation
Syntax in /etc/sudoers
The general syntax of the /etc/sudoers file looks like the following:
o <user/%group> <host> = <command1>[, <command2>…]
• User example:
geeko ALL = /sbin/shutdown
geeko ALL = NOPASSWD: /sbin/shutdown
• Group example:
%admins = /sbin/shutdown
open.sap.com Slide 5
Privilege Delegation
sudo Aliases
There are several kinds of aliases that can be used in the /etc/sudoers file:
o User alias – a collection of users
User_Alias <ALIAS NAME> = <user1>[, <user2>, …]
Example: User_Alias POWERUSERS = tux, geeko
o Command Alias – a collection of commands
Cmnd_Alias <ALIAS NAME> = <command1>[, <command2>, …]
Example: Cmnd Alias KPROCS = /bin/kill, /usr/bin/killall
o Host Alias – a collection of hosts
Host_Alias <ALIAS NAME> = <host1>[, <host2>, …]
Example: Host_Alias HOSTS = da1
o Runas Alias – a collection of users that can be reference by UID
Runas_Alias <ALIAS NAME> = <user1>[, <user2>, …]
Example: Runas_Alias RUNASUSERS = tux, geeko
open.sap.com Slide 6
Privilege Delegation
Using sudo Aliases
open.sap.com Slide 7
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 8
Thank You!
Contact Information:
open@sap.com
Week 3 Unit 1:
Management of RPM Packages
Management of RPM Packages
RPM Basics
open.sap.com Slide 2
Management of RPM Packages
RPM Package Components
Header Signature
CPIO Scripts
open.sap.com Slide 3
Management of RPM Packages
RPM Names
open.sap.com Slide 4
Management of RPM Packages
Installation of RPMs
open.sap.com Slide 5
Management of RPM Packages
RPM Database Query
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
open.sap.com Slide 2
Software Management with libzypp
Software Repositories
open.sap.com Slide 3
Software Management with libzypp
The 4 “P”s of libzypp
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
open.sap.com Slide 5
Software Management with libzypp
Terms Recap
Term Description
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
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
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
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.
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
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
Week 4 Unit 1:
SLES Storage Administration
SLES Storage Administration
Linux I/O Stack
open.sap.com Slide 2
SLES Storage Administration
Partitioning Utilities
There are multiple tools for partition management in SUSE Linux Enterprise Server:
o YaST partitioner module – Graphical or ncurses tool for partitioning, formatting and other block device and
filesystem management
o fdisk – traditional command line tool for manipulating MBR (MSDOS) type partition definitions
o parted – command line tool for MBR and GPT type partitions
open.sap.com Slide 3
SLES Storage Administration
MBR and GPT
open.sap.com Slide 4
SLES Storage Administration
Device Files for Block Devices
open.sap.com Slide 5
SLES Storage Administration
Supported Filesystems
From an applications perspective – in most cases – the filesystem does not matter because of Linux’s
use of the Virtual Filesystem Switch (VFS). The VFS makes the filesystem opaque.
open.sap.com Slide 6
SLES Storage Administration
The Virtual Filesystem Switch (VFS)*
open.sap.com Slide 7
SLES Storage Administration
/etc/fstab
• The /etc/fstab file (file systems table) is the primary configuration file for determining where, how
and when a partition or other storage device is to be mounted on the local system
• There are 6 fields that configure each partition/device
o Field 1: Name, file system label, or UUID
o Field 2: Mount point
o Field 3: Filesystem type
o Field 4: Mount options
o Field 5: Use the dump backup utility?
o Field 6: Sequence of filesystem checks to perform
open.sap.com Slide 8
SLES Storage Administration
Device, Filesystem, and Mounting Utilities
o mount/umount – command line tool for adding or removing a partition from the / (root) filesystem
• Examples of options: remount, rw/ro, sync, atime, user, defaults
o lsblk – list block devices
o blkid – display block IDs and the associated block device files
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 4 Unit 2:
The Shell Environment
The Shell Environment
What is the Shell?
The shell is the most basic user interface to SUSE Linux Enterprise Server.
o Also referred to as the command line interface
There are multiple shells available in SLES, and they are listed in /etc/shells:
o bash (Bourne Again SHell) -> the default shell in SLES
o csh – the c shell
o ksh – the korn shell
o tcsh – an enhanced c shell
o zsh – the z shell
o etc.
open.sap.com Slide 2
The Shell Environment
The Shell Environment
The shell environment is made up of components that can be customized to the user’s preference
using:
o Variables – the most commonly customized part of the shell environment
o Functions – define core functionality of the shell
o Aliases – allow shortcuts to longer, sometimes complex, commands using shorter input
A shell can be invoked in two different ways
o Login shell – the user’s preferred environment (variables, functions and aliases) is set
• A login shell will ask for a username/password
• A login shell can be requested with the --login option when /bin/bash is called
o Non-login shell – the shell inherits an existing environment (from a previously started shell)
• A non-login shell will not ask for username/password (e.g. – a gnome-terminal session)
open.sap.com Slide 3
The Shell Environment
Shell Variables and Settings
open.sap.com Slide 4
The Shell Environment
Shell Aliases
A shell alias allows a typed shortcut to longer, more complex, commands using shorter input.
o Define an alias:
alias ALIAS_NAME=“COMMAND”
o Remove an alias:
unalias ALIAS_NAME
o List all defined aliases:
alias
o Alias definition file:
~/.alias
open.sap.com Slide 5
The Shell Environment
Shell History
When a command is entered in a shell, it is stored in the history file of the user who executed it:
o ~/.bash_history
o View the shell history with the history command
• Scroll through the history with the <up-arrow> and <down-arrow> keys
o Search the history for a command that begins with <string>
• <string><PageUp>/<string><PageDown>
o Search history for any <string>, press ctrl+r
• Execute the found item: press Enter
• Change the found item: press Tab
o Re-execute a numbered command from history:
• !<command-number>
open.sap.com Slide 6
The Shell Environment
Tab Auto-Completion
Commands in a shell can be automatically completed if they are unambiguous, or a list of possibilities
can be displayed:
open.sap.com Slide 7
The Shell Environment
Data Channels
open.sap.com Slide 8
The Shell Environment
Channel Redirection
Command Description
> Redirect stdout into a file
Example: ls /etc > /tmp/etc_files.txt
>> Redirect stdout, appending to a file
open.sap.com Slide 9
The Shell Environment
Chain Commands Together
Command Description
; Chain multiple commands together on a single command line
Example: echo Hello ; echo How are you?
&& Execute a second command only if the first command returns
no error (return code 0)
Example: grep “swap” /etc/fstab && echo Success
|| Execute a second command if the first command returns an
error (i.e. return a code other than 0)
Example: grep “XXX” /etc/fstab || echo Failure
open.sap.com Slide 10
The Shell Environment
Help Resources
open.sap.com Slide 11
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 12
Thank You!
Contact Information:
open@sap.com
Week 4 Unit 3:
Process Administration Basics
Process Administration Basics
Process Basics
o Terminology
• Program: Executable code, stored on a drive
• Process: Executable code, copied into RAM for execution
• Task: Synonym for process
o Basic process types:
• User: Associated with a controlling shell or terminal
• Daemon: Not associated with a controlling shell or terminal
o Every process is assigned a unique Process ID (PID)
o Processes can spawn other processes (parent/child relationship)
open.sap.com Slide 2
Process Administration Basics
View Processes
Command Description
Display running processes
ps Common options:
aux All processes, with user list
-ef All processes, full-format with CLI
Display running processes with their parent/child
pstree relationships
Common options:
-p Add PIDs to the output
top Display processes, sorted by usage and refreshed at an
interval
open.sap.com Slide 3
Process Administration Basics
Manage Processes
Command Description
kill <PID> [signal] Sends a signal to a specific PID
killall <process_name> [signal] Sends a signal to all processes with a specified name
(e.g. killall firefox TERM)
No. Signal Description No. Signal Description
1 HUP Hangup 11 SEGV Segmentation fault
2 INT Interrupt
12 USR2 User defined
3 QUIT Quit
4 ILL Illegal instruction
13 PIPE Broken pipe
5 TRAP Trace 14 ALRM Alarm clock
6 ABRT Aborted 15 TERM Terminated
7 BUS Bus error 16 STKFLT Stack fault
8 FPE Floating point exception 17 CHLD Child exited
9 KILL Killed 18 CONT Continued
10 USR1 User defined 19 STOP Stopped
open.sap.com Slide 4
Process Administration Basics
Process Priority
Command Description
open.sap.com Slide 5
Process Administration Basics
Jobs and Processes
o Jobs (processes) can be put into the background to allow continued use of the shell instead of
waiting for each task to finish
• ctrl+z Pause the task
• bg Continues the paused task in the background
o Start a job directly in the background: append “&”
• Example: xeyes &
• jobs – command to view jobs tied to a shell
• fg – bring background tasks into the foreground
open.sap.com Slide 6
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 7
Thank You!
Contact Information:
open@sap.com
Week 4 Unit 4:
Process Scheduling
Process Scheduling
Cron Jobs
o Cron jobs are the primary way that SUSE Linux Enterprise Server administrators schedule
tasks to be completed regularly. There are cron jobs for users and for the system.
o User cron jobs are configured via the crontab utility:
Option Description
-e Edit a user’s crontab
-l List a user’s crontab
-r Remove a user’s entire crontab
o There are fields in the crontab entries that represent different time intervals:
open.sap.com Slide 2
Process Scheduling
System Cron Jobs
o There are also some predefined directories where tasks can be dropped in for hourly, daily,
weekly, or monthly execution:
• /etc/cron.hourly/
• /etc/cron.daily/
• /etc/cron.weekly/
• /etc/cron.monthly/
open.sap.com Slide 3
Process Scheduling
Cron Architecture
open.sap.com Slide 4
Process Scheduling
The at Daemon
Command Description
at, batch Schedule a task
Ctrl+D exits command input
-f: specify a script file
atq View scheduled tasks for a user
atrm <job_number> Remove a scheduled task
File Description
/etc/at.allow Listed users can define jobs
/etc/at.deny Listed users cannot define jobs
open.sap.com Slide 5
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 6
Thank You!
Contact Information:
open@sap.com