Package management on RHEL
To install without making it default package
Download the package only without install
yum install –downloadonly “PackageName”
downloaded package will go to /var/cache/yum/x86_64/7/updates/packages/
Download and install without configuration
yum install -I “PackageName” –noscripts <– no I or noscript option… moving on to rpm command
rpm -i “PackageName” –noscripts <– installs without going through the install scripts for configuration
To check which version is current default
/etc/sbin/alternatives –config “PackageName”
*please note that –noscripts option will not create the alternative listing for /usr/sbin/alternatives
we can add the program path as alternative name
update-alternatives –install “name” “path”
we can set the program to default by
update-alternatives –set “name” “path”
to view the scripts that runs while installing, do
rpm -qp –scripts PackageName.rpm
Here’s helpful commands on RPM
Installing
rpm -ivh <package_path>
Updating
rpm -Uvh <package_path>
Uninstalling
rpm -e <package_path>
List/Query
rpm -qa | grep <package_name>
Determine package
rpm -qf /etc/passwd
Here’s helpful commands on YUM
Installing
yum install <package_name>
Updating
yum update <package_name>
Uninstalling
yum remove <package_name>
List/Query
yum list -installed
Determine package (finds the package based on the given file)
yum provides /etc/passwd