Install and update the software packages:
package: Its a container that contains the software related programs, files and executables.
system updates and repositories:
yum (rhel and centos) command installs the packages that are defined in the linux system.
configuration files location: /etc/yum.repos.d
apt-get (ubuntu debain)
rpm (redhat package manager)
Difference between yum and rpm:
yum downloads the package from the internet and installs it as well.
rpm just installs the package which is allready downloaded on the linux machine.
In some companies internet access is not allowed. In that case repos are setup locally on another server within the same network.
yum install ntp :it will first check in the machine if ntp is installed or not. if not installed, it will install the ntp package.
rpm -qa: gives the list of the packages that are installed in the linux system.
rpm -qa | wc -l: gives the count of the packages that are installed in the system, it is not actually couting the packages, but counting the lines.
rpm -qa | grep bind: search for bind packages in all the package list.
yum install bind: check for the bind package in the system, if it is not installed go to the internet and download and installs the package.
rpm -e <package name>: removes the package. yum remove bind :removes the bind package
.............,........
system upgrades and patch management:
Two types of upgrades:
Major version: 5.6.7
minor versions: 7.3 to 7.4
minor version upgrade can be done through yum command, but major version upgrade cant be
done through yum command.
...................,.
yum update vs.upgrade
upgrade: delete the old package and keeps the new upgraded package.
update: does not delete the old package
................
cat /etc/os-release: gives the info of the OS.
cat /etc/redhat-release: gives the info of the OS.
yum update: shows the list of the packages that needs an update.
Advance package management:
Installing package
deleting the package
upgrading the package
view package details info
identify source or location information.
package configuration files.
........................
rpm -qa | grep ksh: check if the korn shell package is installed or not in the linux system.
yum install ksh: installs korn shell package and other packages related to ksh. yum remove ksh: remove the packages related to ksh
rpm -hiv ksh-20122355-134.e17.x86_64.rpm: installs the downloaded package. rpm -qi ksh-20122355-134.e17.x86_64.rpm: gives the detailed information of the package ksh.
rpm -e ksh-20122355-134.e17.x86_64.rpm: delete the package ksh.
rpm -qc ksh-20122355-134.e17.x86_64.rpm: list the configuration files of the package ksh. which ksh: gives the full path of the ksh command.
rpm -qf /usr/bin/ksh: gives the package that is associated with ksh command.
which pwd: gives the full path of pwd command.
rpm -qf /usr/bin/pwd: gives the output coreutils. it means pwd command belongs to coreutils.
Comments
Post a Comment