SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Installing and managing Linux software Amir khakshoor
package What is a package? When Linux developers create their software they typically bundle all the executable and data files into a single file called a "package" file.  Type of packages in software context: source code packages :  suite of files related to one program: source code, documentation, and configuration files. Binary packages:  source code packages that have been configured for a particular Unix variant or package manager program.
Software package Packages have different formats  Packages contain different control files  Where the rest of the files should be placed The permissions they should have  A list of prerequisite packages that are required for the package to function correctly
Main Package Formats in Linux Packages Distributed in Binaries or Source Code form Main Package Management Standards RPM (RedHat Package Manager) (.rpm) Introduced by RedHat and has been adopted by many other distributions (Fedora, Mandrake, SuSe) .  The most popular Linux package format DEB (Debian Package Manager) (.deb) Introduced by Debian distribution  Tarball files (.tar.gz/.tar.bz2) The old-fashioned way of distributing software in Linux/Unix Compatible with all distros 4
Package management system Def: collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages for a computer's operating system in a consistent manner.{= install manager} Functions: Verifying file checksums to ensure correct and complete packages. Verifying digital signatures to authenticate the origin of packages. Applying file archivers to manage encapsulated files. Upgrading software with latest versions, typically from a software repository. Grouping of packages by function to help eliminate user confusion. Managing dependencies to ensure a package is installed with all packages it requires.
Package management system(continue) Repositories: give users more control over the kinds of software that they are allowing to be installed on their system Package formats: Each package manager relies on the format and metadata of the packages it can manage.  E.g. yum relies on rpm as a backend.  Common package management systems on:  Red Hat Linux systems : RPM, yum, apt4rpm. Debian Linux systems : Aptitude
Package management system(continue) yum is better than RPM (why)? install from network repositories it can find and install dependent packages needed by the packages you request In other words: resolve dependencies automatically.
RPM Terminology Naming convention:  all package files are labeled with highly identifiable names. {four-part name} dash (-) or a period (.) to separate labels Convention:  name-version-release.architecture.rpm E.g. kernel-smp-2.6.32.9-3.i686.rpm
RPM Terminology(continue) Table 2-1 Supported Architectures
RPM Terminology(continue) Architecture Compatibility :  more recent architectures typically run software that targets older architectures within the same family;  E.g. a 686-class (Pentium II / III / IV) machine runs files within i386, i486, i586, and i686 RPM package files. But: a 386-class (80386) machine runs files within i386
RPM Terminology(continue) Note: noarch in architecture label: indicates this is a special architecture such that the files in the package work on any architecture  Why? All files in package are interpreted scripts, not binary executables, or they are documentation.  usually only the root user can install packages.
Binary RPMs and Source RPMs binary RPM: has been compiled for a particular architecture. E.g., httpd-2.2.17-1.fc13.1.i686.rpm platform-independent binary RPMs: noarch{Applications written in Perl, Python, or other scripting languages} Source RPMs:  contain all the commands, usually in scripts, necessary to recreate the binary RPM. you can recreate the binary RPM at any time.
How login as another user? su : Substitute (switch) User Why? For installing software you need to be root! And so on. Without logging out!	 How to use? suuserid  note: defaultuserid= root
InstllingSoftware From RPM Files There are generally two ways to install RPM files manually.  using a file previously downloaded to your hard drive install the RPM from some sort of removable media such as a CD-ROM drive Use command “rpm” to install (in other word =upgrade).rpm file Most common usage: rpm -Uhv package_file.rpm 14
The RPM Command  rpm -Uvh is the command to install  package  -U qualifier is used for updating an RPM to the latest version -h qualifier gives a list of hash # characters during the installation  -v qualifier prints verbose status messages while the command is run rpm command options in depth: -i: installing specified Package(s) -e : uninstalling (Erasing) specified Package(s) -U :Upgrading= Erasing old one + Installing new one -q : Query whether specifed package exist and installed or not -V : Verifying Installed RPM Packages 15
The RPM Command (continue)  Options to use with –ioption: -v: print out verbose information as the command runs. -h: print a series of hash marks, #, to provide feedback that the command is still running. --excludedocs:  ignore documentation In RPM  --includedocs: reverse of --excludedocs. {Default Option} --replacepkgs: replace, or reinstall, packages it may have already installed.{Fresh Start} --replacefiles: Install package even if it replaces files from other packages --force:  A short hand for --replacepkgsand                         –-replacefiles --nodeps: skip the dependencies check --noscripts: skip running the pre- and post-installation scripts. = --noscripts= --nopre+ --nopost 16
The RPM Command (continue)  Options to use with –U option:  all of options that can used by –i option. Plus:   --oldpackage: install an older version of a package on top of a more recent one.{downgrade} Why installing an old one? Some bug or security vulnerability Newer one won't work with some other package 17
The RPM Command (continue)  Options to use with –q option:  --whatprovides [capability] : what package provides the specified capability. e.g. webserver Or : trace individual files: which package provides specified file. -i: Detailed information about specified package(s) -l: list files that are bundling in specified package --scripts: lists the scripts associated with a package. Note: RPM database itself is stored in the directory /var/lib/rpm/ 18
RPM command example 19 [root@bigboytmp]# rpm -Uvh mysql-server-3.23.58-9.i386.rpm Preparing...        ####################### [100%]   1:mysql-server   ####################### [100%] [root@bigboytmp]#
RPM Installation Errors  Sometimes RPM installations will fail giving Failed dependencies errors which really mean that a prerequisite RPM needs to be installed To get around this problem by run the rpm command with the --nodepsoption to disable dependency checks 20 [root@bigboytmp]# rpm -Uvh--nodeps mysql-3.23.58-9.i386.rpm
Yum (Yellowdog Updater, Modified) YUM adds automatic updates and package management, including dependency management, to RPM systems. Can works with repositories too.
Automatic Updates with yum  	The yum automatic RPM update program comes as a standard feature of Fedora Core. It has a number of valuable features:  You can configure the URLs of download sites you want to use. This provides the added advantage of you choosing the most reliable sites in your part of the globe.  yum makes multiple attempts to download RPMs before failing.  yum automatically figures out not only the RPMs packages that need updating, but also all the supporting RPMs. It then installs them all. 22
Working With yum. Search for a package when you know the name: $ yum list 'foo‘ Search for a package when you're not sure of the name{using REGX} $ yum search 'foo*' $ yum search '*foo?' install and remove a package or multiple packages:  # yum install 'foo' # yum remove 'foo' # yum install 'foo fie fofum' # yum remove 'foo fie fofum' Update an installed package: # yum update 'foo'
Working With yum.(continue) List available updates for installed packages: # yum list updates Update the whole system: # yum update Find out which package a file belongs to: $ yum provides ‘httpd.conf‘ See package groups for installing big clumps of stuff at once. And install, update and remove them. $ yum grouplist # yum groupinstall 'FTP Server' # yum groupupdate 'FTP Server' # yum groupremove 'FTP Server'
Installing Software From DEB Files Unlike Redhat or Frdora,theDebian and Ubuntu versions of Linux rely on packages in the DEB format Use dpkg --install command to install the .deb package 25 root@u-bigboy:~# dpkg--install ndiswrapper-utils_1.8-0ubuntu2_i386.deb Selecting previously deselected package ndiswrapper-utils. (Reading database ... 70221 files and directories currently installed.) Unpacking ndiswrapper-utils(from ndiswrapper-utils_1.8-0ubuntu2_i386.deb) ... Setting up ndiswrapper-utils(1.8-0ubuntu2) ... root@u-bigboy:~#
Compiling Software from Source Code What Compiling means? source code packages usually packaged in the tarball format. tarball? nickname for compressed archives created by the tar program Common file extension*.tar.gz or *.tgz.  Why Use source code in tarball files? Compatible with all Linux distributions
Compiling Software from Source Code(continue) Using Tar utility archive a directory with tar: $ tar -cf tarredfilename.tar Feather Add –v option to get a verbose description Unarchiving Files with tar: $ tar -xf labrea.tar unarchive selected files with tar: $ tar -xf labrea.tar mammoth List files in an archiving without actually unarchiving the file: $ tar -tf filename  see the names of the files as they're extracted from the archive.  $ tar -xvf filename
Compiling Software from Source Code(continue) Installing from source code step by step:  locate a source code package: Unix software archive on the Web  pick a consistent place to put them after download or transfer from a disk  We suggest using the /tmp{why?} You can also use the /usr/src directory,  unpack the archive $ tar xvffilename Change directory to decompressed file directory $ cd  /tmp/filename
Compiling Software from Source Code(continue) You should see README or INSTALL file. $ ls –ltr Read README or INSTALL file. For instruction to Compile. $ less README less INSTALL  Follow these general steps: Configuring the Package: configure, configure.pl, configure.sh, or some similar script. Configure script will run some tests on your machine. Run this: # ./configure Output after running configure script:  Makefile Building the Package.{= begin to compile the software.} Run this: # make
Compiling Software from Source Code(continue) Installing the Package: install the executable binary file as an actual program. Run this:  $ make install This command moves the binary into the proper directory (outside of /tmp) and installs any required configuration or documentation files that were included in the archive clean up: $ rmdir  /tmp/filename
Where to get used Packages Packages on Linux Installation CDs Manually Downloaded Packages two most common ways of getting packages are by manually using FTP or a Web browser 31
Popular Package Download Sites Redhat http://www.redhat.com/  http://www.rpmfind.net/  Fedora ftp://download.fedora.redhat.com/pub/fedora/linux/core/  http://download.fedora.redhat.com/pub/fedora/linux/core/ http://www.rpmfind.net/ 32
Popular Package Download Sites Debain http://packages.debian.org  Ubuntu http://packages.ubuntu.com  33
How to Download Software  Getting Software Using Web-Based FTP Browse the desired Web site until you find the link to the software package.  Click on the link for the desired software package.  Save the file to hard drive  Getting RPMs Using Command-Line Anonymous FTP 34
FTP Commands  Command 	Description 	 binary		Copy files in binary mode 	 cd			Change directory on the FTP server 	 dir			List the names of the files in the current remote 			directory 	 exit		Bye bye get		Get a file from the FTP server 	 lcd			Change the directory on the local machine 	 ls			Same as dir 	 mget		Same as get, but you can use wildcards like "*" 	 mput		Same as put, but you can use wildcards like "*" 	 passive		Make the file transfer passive mode 	 put		Put a file from the local machine onto the FTP 			server 	 pwd		Give the directory name on the local machine 	 35
How to Download Software Getting software 	using wget  The wget command can be used to download files quickly when you already know the URL at which the RPM is locate # wget http://linux.stanford.edu/pub//i386/RPMS/dhcp-3.0pl2-6.16.i386.rpm 36
Thanks for your patient. Any Question? Ask me now or Later on by email: khakshoor.amir@gmail.com

Weitere ähnliche Inhalte

Was ist angesagt?

Linux command ppt
Linux command pptLinux command ppt
Linux command pptkalyanineve
 
IP tables and Filtering
IP tables and FilteringIP tables and Filtering
IP tables and FilteringAisha Talat
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Server configuration
Server configurationServer configuration
Server configurationAisha Talat
 
package mangement
package mangementpackage mangement
package mangementARYA TM
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)Raghu nath
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting ProcessGaurav Sharma
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linuxVarnnit Jain
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux TroubleshootingKeith Wright
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linuxVicent Selfa
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linuxanandvaidya
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 

Was ist angesagt? (20)

Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
IP tables and Filtering
IP tables and FilteringIP tables and Filtering
IP tables and Filtering
 
Presentation on linux
Presentation on linuxPresentation on linux
Presentation on linux
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Server configuration
Server configurationServer configuration
Server configuration
 
package mangement
package mangementpackage mangement
package mangement
 
Linux
Linux Linux
Linux
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
 
Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)Part 01 Linux Kernel Compilation (Ubuntu)
Part 01 Linux Kernel Compilation (Ubuntu)
 
Linux booting Process
Linux booting ProcessLinux booting Process
Linux booting Process
 
Networking in linux
Networking in linuxNetworking in linux
Networking in linux
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
User management
User managementUser management
User management
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
File system structure
File system structureFile system structure
File system structure
 
An Introduction to Linux
An Introduction to LinuxAn Introduction to Linux
An Introduction to Linux
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 

Ähnlich wie Software management in linux

101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package managementAcácio Oliveira
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package managementAcácio Oliveira
 
Linux training
Linux trainingLinux training
Linux trainingartisriva
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinuxtutorialsruby
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinuxtutorialsruby
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryAneesa Rahman
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)Thierry Gayet
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.İbrahim UÇAR
 

Ähnlich wie Software management in linux (20)

101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management101 2.5 use rpm and yum package management
101 2.5 use rpm and yum package management
 
2.5 use rpm and yum package management
2.5 use rpm and yum package management2.5 use rpm and yum package management
2.5 use rpm and yum package management
 
$ make install
$ make install$ make install
$ make install
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
RPM (LINUX)
RPM (LINUX)RPM (LINUX)
RPM (LINUX)
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Linux
Linux Linux
Linux
 
RPM Packaging 101 (Old)
RPM Packaging 101 (Old)RPM Packaging 101 (Old)
RPM Packaging 101 (Old)
 
Sahul
SahulSahul
Sahul
 
Sahul
SahulSahul
Sahul
 
Linux training
Linux trainingLinux training
Linux training
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinux
 
InstallingRoRinLinux
InstallingRoRinLinuxInstallingRoRinLinux
InstallingRoRinLinux
 
RHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & RecoveryRHEL Log-files, RPM, Backup & Recovery
RHEL Log-files, RPM, Backup & Recovery
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
 
Linux
LinuxLinux
Linux
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 

Kürzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Software management in linux

  • 1. Installing and managing Linux software Amir khakshoor
  • 2. package What is a package? When Linux developers create their software they typically bundle all the executable and data files into a single file called a "package" file. Type of packages in software context: source code packages : suite of files related to one program: source code, documentation, and configuration files. Binary packages: source code packages that have been configured for a particular Unix variant or package manager program.
  • 3. Software package Packages have different formats Packages contain different control files Where the rest of the files should be placed The permissions they should have A list of prerequisite packages that are required for the package to function correctly
  • 4. Main Package Formats in Linux Packages Distributed in Binaries or Source Code form Main Package Management Standards RPM (RedHat Package Manager) (.rpm) Introduced by RedHat and has been adopted by many other distributions (Fedora, Mandrake, SuSe) . The most popular Linux package format DEB (Debian Package Manager) (.deb) Introduced by Debian distribution Tarball files (.tar.gz/.tar.bz2) The old-fashioned way of distributing software in Linux/Unix Compatible with all distros 4
  • 5. Package management system Def: collection of software tools to automate the process of installing, upgrading, configuring, and removing software packages for a computer's operating system in a consistent manner.{= install manager} Functions: Verifying file checksums to ensure correct and complete packages. Verifying digital signatures to authenticate the origin of packages. Applying file archivers to manage encapsulated files. Upgrading software with latest versions, typically from a software repository. Grouping of packages by function to help eliminate user confusion. Managing dependencies to ensure a package is installed with all packages it requires.
  • 6. Package management system(continue) Repositories: give users more control over the kinds of software that they are allowing to be installed on their system Package formats: Each package manager relies on the format and metadata of the packages it can manage. E.g. yum relies on rpm as a backend. Common package management systems on: Red Hat Linux systems : RPM, yum, apt4rpm. Debian Linux systems : Aptitude
  • 7. Package management system(continue) yum is better than RPM (why)? install from network repositories it can find and install dependent packages needed by the packages you request In other words: resolve dependencies automatically.
  • 8. RPM Terminology Naming convention: all package files are labeled with highly identifiable names. {four-part name} dash (-) or a period (.) to separate labels Convention: name-version-release.architecture.rpm E.g. kernel-smp-2.6.32.9-3.i686.rpm
  • 9. RPM Terminology(continue) Table 2-1 Supported Architectures
  • 10. RPM Terminology(continue) Architecture Compatibility : more recent architectures typically run software that targets older architectures within the same family; E.g. a 686-class (Pentium II / III / IV) machine runs files within i386, i486, i586, and i686 RPM package files. But: a 386-class (80386) machine runs files within i386
  • 11. RPM Terminology(continue) Note: noarch in architecture label: indicates this is a special architecture such that the files in the package work on any architecture Why? All files in package are interpreted scripts, not binary executables, or they are documentation. usually only the root user can install packages.
  • 12. Binary RPMs and Source RPMs binary RPM: has been compiled for a particular architecture. E.g., httpd-2.2.17-1.fc13.1.i686.rpm platform-independent binary RPMs: noarch{Applications written in Perl, Python, or other scripting languages} Source RPMs: contain all the commands, usually in scripts, necessary to recreate the binary RPM. you can recreate the binary RPM at any time.
  • 13. How login as another user? su : Substitute (switch) User Why? For installing software you need to be root! And so on. Without logging out! How to use? suuserid note: defaultuserid= root
  • 14. InstllingSoftware From RPM Files There are generally two ways to install RPM files manually. using a file previously downloaded to your hard drive install the RPM from some sort of removable media such as a CD-ROM drive Use command “rpm” to install (in other word =upgrade).rpm file Most common usage: rpm -Uhv package_file.rpm 14
  • 15. The RPM Command rpm -Uvh is the command to install package -U qualifier is used for updating an RPM to the latest version -h qualifier gives a list of hash # characters during the installation -v qualifier prints verbose status messages while the command is run rpm command options in depth: -i: installing specified Package(s) -e : uninstalling (Erasing) specified Package(s) -U :Upgrading= Erasing old one + Installing new one -q : Query whether specifed package exist and installed or not -V : Verifying Installed RPM Packages 15
  • 16. The RPM Command (continue) Options to use with –ioption: -v: print out verbose information as the command runs. -h: print a series of hash marks, #, to provide feedback that the command is still running. --excludedocs: ignore documentation In RPM --includedocs: reverse of --excludedocs. {Default Option} --replacepkgs: replace, or reinstall, packages it may have already installed.{Fresh Start} --replacefiles: Install package even if it replaces files from other packages --force: A short hand for --replacepkgsand –-replacefiles --nodeps: skip the dependencies check --noscripts: skip running the pre- and post-installation scripts. = --noscripts= --nopre+ --nopost 16
  • 17. The RPM Command (continue) Options to use with –U option: all of options that can used by –i option. Plus: --oldpackage: install an older version of a package on top of a more recent one.{downgrade} Why installing an old one? Some bug or security vulnerability Newer one won't work with some other package 17
  • 18. The RPM Command (continue) Options to use with –q option: --whatprovides [capability] : what package provides the specified capability. e.g. webserver Or : trace individual files: which package provides specified file. -i: Detailed information about specified package(s) -l: list files that are bundling in specified package --scripts: lists the scripts associated with a package. Note: RPM database itself is stored in the directory /var/lib/rpm/ 18
  • 19. RPM command example 19 [root@bigboytmp]# rpm -Uvh mysql-server-3.23.58-9.i386.rpm Preparing... ####################### [100%] 1:mysql-server ####################### [100%] [root@bigboytmp]#
  • 20. RPM Installation Errors Sometimes RPM installations will fail giving Failed dependencies errors which really mean that a prerequisite RPM needs to be installed To get around this problem by run the rpm command with the --nodepsoption to disable dependency checks 20 [root@bigboytmp]# rpm -Uvh--nodeps mysql-3.23.58-9.i386.rpm
  • 21. Yum (Yellowdog Updater, Modified) YUM adds automatic updates and package management, including dependency management, to RPM systems. Can works with repositories too.
  • 22. Automatic Updates with yum The yum automatic RPM update program comes as a standard feature of Fedora Core. It has a number of valuable features: You can configure the URLs of download sites you want to use. This provides the added advantage of you choosing the most reliable sites in your part of the globe. yum makes multiple attempts to download RPMs before failing. yum automatically figures out not only the RPMs packages that need updating, but also all the supporting RPMs. It then installs them all. 22
  • 23. Working With yum. Search for a package when you know the name: $ yum list 'foo‘ Search for a package when you're not sure of the name{using REGX} $ yum search 'foo*' $ yum search '*foo?' install and remove a package or multiple packages: # yum install 'foo' # yum remove 'foo' # yum install 'foo fie fofum' # yum remove 'foo fie fofum' Update an installed package: # yum update 'foo'
  • 24. Working With yum.(continue) List available updates for installed packages: # yum list updates Update the whole system: # yum update Find out which package a file belongs to: $ yum provides ‘httpd.conf‘ See package groups for installing big clumps of stuff at once. And install, update and remove them. $ yum grouplist # yum groupinstall 'FTP Server' # yum groupupdate 'FTP Server' # yum groupremove 'FTP Server'
  • 25. Installing Software From DEB Files Unlike Redhat or Frdora,theDebian and Ubuntu versions of Linux rely on packages in the DEB format Use dpkg --install command to install the .deb package 25 root@u-bigboy:~# dpkg--install ndiswrapper-utils_1.8-0ubuntu2_i386.deb Selecting previously deselected package ndiswrapper-utils. (Reading database ... 70221 files and directories currently installed.) Unpacking ndiswrapper-utils(from ndiswrapper-utils_1.8-0ubuntu2_i386.deb) ... Setting up ndiswrapper-utils(1.8-0ubuntu2) ... root@u-bigboy:~#
  • 26. Compiling Software from Source Code What Compiling means? source code packages usually packaged in the tarball format. tarball? nickname for compressed archives created by the tar program Common file extension*.tar.gz or *.tgz. Why Use source code in tarball files? Compatible with all Linux distributions
  • 27. Compiling Software from Source Code(continue) Using Tar utility archive a directory with tar: $ tar -cf tarredfilename.tar Feather Add –v option to get a verbose description Unarchiving Files with tar: $ tar -xf labrea.tar unarchive selected files with tar: $ tar -xf labrea.tar mammoth List files in an archiving without actually unarchiving the file: $ tar -tf filename see the names of the files as they're extracted from the archive. $ tar -xvf filename
  • 28. Compiling Software from Source Code(continue) Installing from source code step by step: locate a source code package: Unix software archive on the Web pick a consistent place to put them after download or transfer from a disk We suggest using the /tmp{why?} You can also use the /usr/src directory, unpack the archive $ tar xvffilename Change directory to decompressed file directory $ cd /tmp/filename
  • 29. Compiling Software from Source Code(continue) You should see README or INSTALL file. $ ls –ltr Read README or INSTALL file. For instruction to Compile. $ less README less INSTALL Follow these general steps: Configuring the Package: configure, configure.pl, configure.sh, or some similar script. Configure script will run some tests on your machine. Run this: # ./configure Output after running configure script: Makefile Building the Package.{= begin to compile the software.} Run this: # make
  • 30. Compiling Software from Source Code(continue) Installing the Package: install the executable binary file as an actual program. Run this: $ make install This command moves the binary into the proper directory (outside of /tmp) and installs any required configuration or documentation files that were included in the archive clean up: $ rmdir /tmp/filename
  • 31. Where to get used Packages Packages on Linux Installation CDs Manually Downloaded Packages two most common ways of getting packages are by manually using FTP or a Web browser 31
  • 32. Popular Package Download Sites Redhat http://www.redhat.com/ http://www.rpmfind.net/ Fedora ftp://download.fedora.redhat.com/pub/fedora/linux/core/ http://download.fedora.redhat.com/pub/fedora/linux/core/ http://www.rpmfind.net/ 32
  • 33. Popular Package Download Sites Debain http://packages.debian.org Ubuntu http://packages.ubuntu.com 33
  • 34. How to Download Software Getting Software Using Web-Based FTP Browse the desired Web site until you find the link to the software package. Click on the link for the desired software package. Save the file to hard drive Getting RPMs Using Command-Line Anonymous FTP 34
  • 35. FTP Commands Command Description binary Copy files in binary mode cd Change directory on the FTP server dir List the names of the files in the current remote directory exit Bye bye get Get a file from the FTP server lcd Change the directory on the local machine ls Same as dir mget Same as get, but you can use wildcards like "*" mput Same as put, but you can use wildcards like "*" passive Make the file transfer passive mode put Put a file from the local machine onto the FTP server pwd Give the directory name on the local machine 35
  • 36. How to Download Software Getting software using wget The wget command can be used to download files quickly when you already know the URL at which the RPM is locate # wget http://linux.stanford.edu/pub//i386/RPMS/dhcp-3.0pl2-6.16.i386.rpm 36
  • 37. Thanks for your patient. Any Question? Ask me now or Later on by email: khakshoor.amir@gmail.com