YUM
Yum is an interactive, rpm-based package manager. It can automatically perform system updates, including dependency analysis and processing based on "repository" metadata. It can perform installation of new packages, removal of old packages and perform queries on the installed and/or available packages among many other commands available.
The configuration file for Yum and related utilities is located at /etc/yum.conf . All the repositories new or existing are with .repo file extension under /etc/yum.repo.d/ directory.
For example I created below repo :
[root@node4 ~]# cat /etc/yum.repos.d/maprtech.repo
[maprtech]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/v4.0.1/redhat/
enabled=1
gpgcheck=0
protect=1
Here :
Name - Human readable name of the repository
Baseurl - URL to the repodata directory ( I.e where all the rpm's are hosted )
Enabled - Enable repository when performing updates and installs (enabled=1)
Gpgcheck - Enable/disable GPG signature checking (gpgcheck=0 disables GPG-checking)
Protect - To protect a repository (
mainly protect existing package being
updated from existing repo by package in Non-standard repo )
Some Common examples and tricks to use Yum :
1) List all spark packages available from repo .
[root@node4 ~]# yum list | grep mapr-spark
mapr-spark.noarch 1.5.2.201512161339-1 maprecosystem
mapr-spark-historyserver.noarch 1.5.2.201512161339-1 maprecosystem
mapr-spark-master.noarch 1.5.2.201512161339-1 maprecosystem
2) Erase installed/erase package with dependencies .
yum install mapr-spark ( This will only install latest Spark version if multiple avail in Repo )
yum erase mapr-spark
3) If you want to install specific version of spark .
a) List all Spark package version.
[root@node4 ~]# yum --showduplicates list mapr-spark
Available Packages
mapr-spark.noarch 1.0.2.201408081440-1 maprecosystem
mapr-spark.noarch 1.1.0.201411081007-1 maprecosystem
mapr-spark.noarch 1.2.1.201506091827-1 maprecosystem
mapr-spark.noarch 1.3.1.201506011823-1 maprecosystem
mapr-spark.noarch 1.4.1.201509021818-1 maprecosystem
mapr-spark.noarch 1.5.2.201512161339-1 maprecosystem
b) Now if you like to install specific version of package you can append the version info to the name of the package as yum install <package name>-<version info>
yum install mapr-spark-1.2.1.201506091827-1 ( This will install spark-1.2 instead of latest)
4) Now incase you have some repo with outdated links causing issues , we can ignore all other repo except MAPR_CORE via below command.
4) Now incase you have some repo with outdated links causing issues , we can ignore all other repo except MAPR_CORE via below command.
yum --disablerepo=* --enablerepo=MapR_CORE install mapr-fileserver
No comments:
Post a Comment