Skip to main content

Install and update the software packages.

 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

Popular posts from this blog

Linux basic commands

 Linux basic commands: du  -sh  *  |  sort  -h  -r   |  head  -n  40  :    list out first 40 files in the directory that are taking more space in the directory.  cd : change directory Is-l listing the items in long listing format  pwd : print working directory Is-I format: type :no of links:owner : group:size :month :day :time :name cd/: go to/directory whoami: tells us by which username we are logged in. touch jerry: creates the file named jerry in present working directory. cp jerry lex: copy the content of jerry file and paste it to lex file. vi text1: creates the file text1 and open it in vi editor mkdir superman: creates the directory called superman mkdir abc def  : creates 2 folder in one command. touch filename wont work in /etc/ folder if logged in by normal account. man cp: shows manual for cp command. echo "india is my country"> file1 puts the text in file1. rm filename: remove the filename  mv lex luther renames the file from lex to luther  mv luther /h

patching tasks

 Patching a Linux system is a critical task to ensure that the system remains secure, stable, and up-to-date with the latest features and fixes. Here’s a comprehensive guide to the tasks involved in Linux patching: 1. Pre-Patching Preparation Backup System : Ensure you have a full system backup, including critical data, configuration files, and applications. Test the backup to verify its integrity. Check Disk Space : Verify that you have enough disk space, particularly on /var , /tmp , and /boot partitions. Review Current Patch Level : Determine the current patch level and installed packages using package management tools like yum , apt , dpkg , or rpm . Check System Logs : Review system logs to identify any issues that might affect the patching process. Test in a Staging Environment : If possible, apply patches in a staging environment that mirrors production to identify potential issues. Notify Stakeholders : Inform stakeholders about the scheduled maintenance window and expected do