0% found this document useful (0 votes)
78 views4 pages

Acquiring and Managing Software: A-Debian GNU/Linux

Acquiring and managing software involves understanding software packages, repositories, and package management tools. There are different tools for different distributions like apt/aptitude for Debian/Ubuntu which use .deb packages and yum/dnf for RHEL/Fedora which use .rpm packages. Both tools allow users to install, update, upgrade and remove software packages and their dependencies from repositories. Services can be managed using systemctl on systemd-based distros or using init scripts.

Uploaded by

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

Acquiring and Managing Software: A-Debian GNU/Linux

Acquiring and managing software involves understanding software packages, repositories, and package management tools. There are different tools for different distributions like apt/aptitude for Debian/Ubuntu which use .deb packages and yum/dnf for RHEL/Fedora which use .rpm packages. Both tools allow users to install, update, upgrade and remove software packages and their dependencies from repositories. Services can be managed using systemctl on systemd-based distros or using init scripts.

Uploaded by

Stephen Efange
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Acquiring and Managing Software

(Edwin Achimbi)
-packages are like subprograms/applications. e.g rpms and debs.
-repository: a central location in which data is stored and managed.
-packages could be in the form of a tarball - A tarball is a single file in which multiple
files are gathered together for convenient storage or distribution.
Selection
Choose a distribution based on needs, since each is different. When selecting consider the
following;
Cost
Features
Function
Support

software Packages.

a-Debian GNU/Linux:
-Popular variations of Debian include Ubuntu and Mint.
-holds multiple files and metadata related to some set of software in the format of an ar archive
file.
-preferred software is Ubuntu.
- a favorite of the hard-core Linux geeks
Command for install, manage, upgrade, and remove software

- The aptitude command (apt) is a package installation tool that provides a screen-oriented menu
that runs in the shell.
- apt-get is a command-line tool which helps in handling packages in Linux.
- Its main task is to retrieve information and packages from the authenticated sources (repository)
for installation, upgrade and removal of packages along with their dependencies
- apt-get, apt - manage, upgrade, and remove software.
-Uses the .deb packaging.
- APT stands for the Advanced Packaging Tool.
- apt* list a set of apt commands that can be used to manage package installations.
Apt* commands are preceded by sudo. That’s because it is common practice for an Ubuntu
administrator to run administrative commands as a regular user with sudo privilege.
Example of apt* commands
Other examples of using the apt-get command tool is;

Syntax:
~$ sudo apt-get install apache2 (to install apache2)
~$ sudo apt-get remove apache2 (to uninstall apache2)
~$ sudo apt-get upgrade apache2 (to update apache2)
- Debian/Ubuntu based systems use a command called tasksel for installing group of packages
used for specific tasks.
-Tasksel provides a number of group packages to configure a server quickly like “LAMP
Server”, “DNS Server”, “Mail Server”. For example, type on your terminal prompt:
~$ sudo tasksel

Managing services
1-systemd
-Start/stop or restart services in the past used the init scripts in the /etc/init.d directory.
This directory holds different scripts for different services.
-Ubuntu including many other distributions moved on and now use the use systemd instead of
the init.
In systemd, you manage sevices with systemctl command, which is still able to use the service
commands. This is because service command is actually redirect to systemctl.
Example. To list all the services in a linux system;

$ systemctl list-unit-files ------ list all service types

To see all the services running in the system,


$ systemctl | grep running
Start/Stop/Restart and status of Services
a-systemctl start <service-name>
b-systemctl stop <service-name>
c-systemctl restart <service-name>
d-systemctl status <service-name>

2- using init
The service --status-all (list all services). The services preceded by [ –] are disabled and those
with [ +] are enabled.
a-service <service-name> start
b-service <service-name> stop
c-service <service-name> restart
d-service <service-name> status

b- RHEL and Fedora.


-Examples of preferred software are red hat linux and centos.
-Uses the, .rpm packaging.
-an RPM package is a consolidation of files needed to provide features such as a word processor,
a photo viewer, or a file server.
-an RPM file also contains metadata that stores information about the contents of that package,
where the package came from, what it needs to run, and other information.
-To find out the name of an RPM package currently installed on your system

# rpm –q

Commands for install, manage, upgrade, and remove software.


The rpm command was the first tool to manage RPMs. Later, yum was added to enhance the
RPM facility, and now dnf is poised to eventually replace yum.
- rpm - you can install, update, query, validate, and remove RPM packages.
Drawback of the rpm:
-depends on other software installed in the system (library, executables..to name a few) for it to
work.
-Without the dependent software present, the rpm package installation fails, called Dependency
hell .
- Rpms cannot locate/provide exact location of a rpm file. Must be provided by the installer.
These setbacks let to the development of the YUM.
-YUM stands for Yellow Dog Updater Modified. Developed to solve the problem of
dependencies.
The yum repositories:
-directory on a web server (http://)
- on an FTP server (ftp://),
-on local media such as a CD or DVD, or in a local directory (file://).
The locations of these repositories would then be stored on the user’s system in the /etc/yum.
DNF, which refers to itself as Dandified YUM is the next generation. dnf is a tool for finding,
installing, querying, and generally managing RPM packages from remote software repositories
to your local Linux system. While dnf maintains a basic command-line compatibility with yum,
one of its main differences is that it adheres to a strict API. That API encourages the
development of extensions and plug-ins to dnf.
How does YUM work
# yum [options] command
-The syntax would let you find packages, see package information, find out about package
groups, update packages, or delete packages, to name a few features
YUM install process commands
-Checking /etc/yum.conf. This is the basic yum configuration file. Every yum command at
startup checks the /etc/yum.conf file for default settings.
-The /etc/yum.repos.d directory is the more typical location for identifying repositories.
To serach for packages..
-yum search [option]
You can list just packages that are available or installed, or you can list all packages.
Yum list [package_name]
-yum install [option]
-Yum remove [option]
---see yum cheat sheet for more details…..

- yum commands are typically run as yum <command> <package name/s>


- The following is a list of the most commonly-used yum commands
yum install <package name/s>
yum update <package name/s>
yum check-update
yum remove <package name/s>
yum provides <file name>
yum search <keyword>
yum localinstall <absolute path to package name/s>

Yum Options
yum options are typically stated before specific yum commands; i.e. yum <options> <command>
<package name/s> .
The following is a list of the most commonly-used yum options
-y : Answer "yes" to every question in the transaction.
-t : Sets yum to be "tolerant" of errors with regard to packages specified in the transaction
For a complete list of available yum options, refer to man yum.

You might also like