0% found this document useful (0 votes)
39 views23 pages

Nest207 f24 Module 01

The document discusses: 1. Debian vs RPM Linux distributions and key differences in their package management systems. 2. The basics of server installation for RPM-based Linux distributions like Red Hat Enterprise Linux 8, including recommended hardware requirements, installation methods, and key steps in the installation process. 3. Package management in RPM-based systems using the RPM and DNF commands. Key differences between RPM and DNF are outlined, and common package management tasks like installing, upgrading, querying, and managing software repositories are described.

Uploaded by

asaini2007
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)
39 views23 pages

Nest207 f24 Module 01

The document discusses: 1. Debian vs RPM Linux distributions and key differences in their package management systems. 2. The basics of server installation for RPM-based Linux distributions like Red Hat Enterprise Linux 8, including recommended hardware requirements, installation methods, and key steps in the installation process. 3. Package management in RPM-based systems using the RPM and DNF commands. Key differences between RPM and DNF are outlined, and common package management tasks like installing, upgrading, querying, and managing software repositories are described.

Uploaded by

asaini2007
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
You are on page 1/ 23

UNIX SYSTEM ADMINISTRATION - 2

NEST - 207
Module - 1
Agenda – Module 1
Authentic information is available from the given resources in course outline and URL's mentioned from this slides, and
this presentation is only supportive document to be read with the given resources and corrected accordingly if required.

• Debian vs RPM Linux distros


• Installation of Linux Servers
• Refer Chapter 1,2,9,10 of Course
• Package Management Book
• TECH-172 course resources are
required as pre-requisite.
• Chapters 3,4,5,6,7 of Course
book must be referred as pre-
requisite for this course
(TECH172)
RPM Linux
• Most of the Debian based Linux commands and environment are similar with rpm-based
Linux, exceptions are there where the Debian commands may not work in rpm Linux, or
the functioning is different (example adduser)
• Using adduser, it creates user, group with same name, make the user member of the group,
create home directory, copies files from /etc/skel to the user home directory. The user is
locked and needs to be given password using passwd command for the user to login.
• In RPM, wheel group is like sudo group in Debian Linux, and the user must be made
member of wheel to run the command as root using sudo.
• Package info and installation commands about Redhat (rpm Linux distros) are given below,
Redhat (rpm) Ubuntu
Packages .rpm extension .deb extension
Install packages dnf (v4, dnf technology), rpm apt, dpkg
Repository Separate files in /etc/apt/sources.list
location /etc/dnf.repos.d/
• Refer Chapter 9,10 in Course Textbook for Package Management
Servers
• Servers operate within a client-server architecture, servers are
computer programs running to serve the requests of other programs,
the clients.

• The client–server model of computing is a distributed application


structure that partitions tasks or workloads between the providers of a
resource or service, called servers, and service requesters, called
clients.
Type of Servers
• File & Print Servers • LDAP Servers
• Web servers • DNS servers
• Mail servers • DHCP servers
• FTP/Telnet servers • SSH servers
• Firewall Servers • Backup Servers
• Database Servers • Media Servers
• Logging Servers • Syslog servers
• Cloud & Virtualization • Application Servers, etc.,
... many more
Course Operating system
• Red hat Enterprise Server Linux 8, also other similar rpm Linux
distributions with same binaries could be used for more learning
experience, like
• CentOS
• Oracle Linux
Server Installation
• Red hat Enterprise Linux (RHEL) Server 8
• Does NOT support 32-bit x86 architectures.
• CPU Logical: support up to 768 logical CPUs
• RAM: Min – 1.5 GB, Max – 24TB (depends on the purpose)
• HDD: 10GiB (base system) but recommended 20GiB
• HDD could be more depending on the desired services, such as
file/print services, web hosting, email hosting, etc.
• Reference on installation requirements - click here
• Reference to recommended steps - click here
https://access.redhat.com/articles/rhel-limits
Server Installation
• Server installation can be done as GUI or Minimal, using.
• DVD, USB
• NFS
• URL

• Red Hat Enterprise Linux can be installed using any of the following methods:
• GUI-based installations
• System or cloud image-based installations using RedHat Image Builder
• Advanced installations
• Automated installation using Kickstart
• Remote installation using VNC
• Installing from network using PXE

• Installation can be.


• new/clean/fresh installation as physical system
• new/clean/fresh installation as virtual guest machine
• upgrade/migrate to the latest version of Linux from previous version
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_a_standard_rhel_installation/preparing-for-your-
installation_installing-rhel
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-installmethod-x86.html
RHEL Installation
• Installation method
• Language
• Keyboard Layout
• Location
• Date and Time
• Network
• Host and Domain name
• Installation source
• Software selection
• Installation destination - Disk configuration/LVM/partitioning
• Security Policy
• Kdump
• Root password
• User & password Refer Exercises in Chapter 1 of Course Textbook.

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-security-policy-x86.html
RHEL Installation
• RHEL installer program is called Anaconda
• Installation log files are stored /root, /var/log/, /tmp.
• Refer Table1-1 Installation Logs of course book
• The Virtual consoles can be used to check on ongoing progress of
installation
• Virtual console 1 is main installer console screen
• Virtual console 2 can be used as command prompt
• Virtual console 6 is the graphical screen
• Virtual screen 3,4,5 shows messages related to installation, storage and
program respectively, otherwise bash command prompt is displayed.
Required Reading Chapter-1
Package Management
• rpm packages can be managed using dnf (or dnf) and rpm
commands
• dnf – Yellowdog Updater Modified using dnf (dnf v4)
• rpm – Redhat Package Manager
• dnf (or dnf) vs rpm
• dnf can download and install the dependent packages and
also can connect to the repository and download the
required packages
• rpm does not install dependent packages and is unable
to connect/download from repositories.
• rpm cannot update software, but dnf can do updates
Package Management - rpm
• To query all packages : rpm –qa or rpmquery -a

• To query a package : rpm –q package

• To list all files in a package : rpm –ql package


Package Management - rpm
• To list only documentation files in a package :
rpm –qd package

• To identify package associated with the file :


rpm –qf file

• To display information about package :


rpm –qi package
Package Management - rpm
• To install package : rpm –ivh package
• option i is to install the package, v for detailed information and h to show installation progress
• Note in the screenshot below, unlike dnf, rpm command requires the full path of the package to install

• Removing a package : rpm –ev package


Package Management - rpm
• To upgrade package : rpm –Uvh package
• To freshen package : rpm –Fvh package
• Overwriting a package replaces the existing files associated with
the package with the same version :
rpm –ivh –replacepkgs package
• Refer the other options and its purpose available for rpm
Package Management - dnf
• A dnf repository is a storage where software packages are available and used to
download and install when required with appropriate configuration which could be free
or available on subscription.
• The configuration file is /etc/dnf/dnf.conf
• It is also called repo and could be used to retrieve package and install, query, update
installed packages.
• RHEL8 is distributed to two main repositories BaseOS and AppStream which is available
in the ISO installation.
• These two repositories can be created locally configuring repo file with extension
“.repo” in /etc/yum.repos.d directory
• The repo can be configured locally or for DVD, FTP, HTTP or NFS sources by setting the
baseurl directive with two forward slash characters
• gpgcheck GNU Privacy Guard (GnuPG or GPG) public key signature for ensuring the
credibility of its developer or publisher.
Creating local repository
1. Copy the two directories BaseOS and AppStream directory to
the designated local directory (example /var/local) from the
installation media
2. Create the definition file for local repo in /etc/yum.repos.d
directory
[user1@rhel ~ ] $ cat /etc/yum.repos.d/BaseOS.repo [user1@rhel ~ ] $ cat /etc/yum.repos.d/AppStream.repo
[BaseOS] [AppStream]
name=BaseOS repo name=AppStream repo
baseurl=file:///BaseOS baseurl=file:///AppStream
enabled=1 enabled=1
gpgcheck=0 gpgcheck=0

3. Clean dnf cache by running dnf clean all


4. Run sudo dnf –v repolist to confirm the creation of the local
repository
Package Management - dnf
• To list the installed packages : dnf list installed

• Listing packages available for installation from all configured dnf


repos : dnf list available
Package Management - dnf
• To list installed packages & available packages for installation
from all configured dnf repos : dnf list
• To list packages available for update from all configured dnf
repos : dnf list updates
• To list and find a specific package is installed or available from
configured dnf repos : dnf list package

• To install package : dnf –y install package (-y option installs without confirmation)
• To remove package : dnf –y remove package
Package Management - dnf
• To list packages installed using wild card : dnf list name*
• To list recently added packages : dnf list recent
• To install package : dnf –y install package (-y option installs without confirmation)
• To update an installed package : dnf –y update package
• To update all installed package : dnf –y update
• To view header info on package : dnf info package
• To search for packages of a specific file : dnf provides file
• To remove package : dnf –y remove package
• To review the transactions using dnf : sudo dnf history
• Alternatively, dnf can be replaced by yum, example yum install package
• Reveiw and familariase other options of dnf command and its purpose
Package Management - dnf
• To list a summary of installed and available groups :
dnf groups summary
• To list all environment and other groups that are available for installation :
dnf group list
• To display header information associated with a group :
dnf group info group_package
• To install a group of packages : dnf –y group install group_package
• To update a group of packages : dnf –y group update group_package
• To remove group package : dnf –y group remove group_package
• Yum cheat sheet :
https://access.redhat.com/sites/default/files/attachments/rh_dnf_cheatsheet_1214_jcs_print-1.pdf
Package Management - dnf
• Module Management - A module is a set of RPM packages that represent a component
and are usually installed together.
• A typical module contains packages with an application, packages with the application-
specific dependency libraries, packages with documentation for the application, and
packages with helper utilities.
• Within modules, streams are organized by version and profiles are organized by purpose.
• To list all modules along with their stream, profile, and summary information
dnf module list
• To list all streams for a specific module such as perl Package management :
Required reading of Chapter
dnf module list perl 9,10 of course book
• To install a module perl : dnf module install perl
• To update a module: dnf module update module_name
• To display module info: dnf module info --profile module_name
• To remove a module : dnf module remove module_name:stream
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/installing_managing_and_removing_user-
space_components/introduction-to-modules_using-appstream
Installing from source
• Installation is done from source files when they are not available in repositories
• Steps to install
1. To check compression method
file packagename
2. Uncompress
tar xvf source tarball tgz or tar.gz -C ~/source
tar jxvg source tarball bz or tar.bz -C ~/source
3. Check for dependencies
• From the uncompressed directory, read README file, then run ./configure, which
checks for dependencies
4. compile the source
• After configure script is successful, run make command
• Then run make install
• In case of failure, need to check for errors, fix it and run make
clean before starting again
• To remove
sudo make uninstall

You might also like