Upgrading to CDH 5.x Using Packages
Minimum Required Role: Cluster Administrator (also provided by Full Administrator)
This topic describes how to upgrade CDH from any version of CDH 5.x to a higher version of CDH 5.x using Cloudera Manager and packages.The minor version of Cloudera Manager you use to perform the upgrade must be equal to or greater than the CDH minor version. To upgrade Cloudera Manager, see Overview of Upgrading Cloudera Manager.
The upgrade procedure described in this topic requires cluster downtime. If the cluster was installed using parcels, has a Cloudera Enterprise license, and has HDFS high availability enabled, you can perform a rolling upgrade that does not require cluster downtime.
If the CDH 5 cluster you are upgrading was installed using packages, you can upgrade it using parcels, and the upgraded version of CDH will then use parcels for future upgrades or changes. You can also migrate your cluster from using packages to using parcels before starting the upgrade.
Upgrading using packages is for advanced users. Some parts of this procedure require you to run commands from the command line on all cluster hosts. This may require significant time. Additionally, if other software packages are installed on cluster hosts, the upgrade steps described in this topic could update dependencies that affect those packages.

[Not required for CDH maintenance release upgrades.].
The version numbers for maintenance releases differ only in the third digit, for example when upgrading from CDH 5.8.0 to CDH 5.8.2. See Maintenance Version Upgrades.
To upgrade CDH using packages:
- Step 1: Collect Upgrade Information
- Step 2: Complete Pre-Upgrade Steps
- Step 3: Upgrade Unmanaged Components
- Step 4: Stop Cluster Services
- Step 5: Back up the HDFS Metadata on the NameNode
- Step 6: Back Up Databases
- Step 7: Upgrade Managed Components
- Step 8: Update Symlinks for the Newly Installed Components
- Step 9: Run the Upgrade Wizard
- Step 10: Recover from Failed Steps or Perform a Manual Upgrade
- Step 11: Finalize the HDFS Metadata Upgrade
- Step 12: Exit Maintenance Mode
- Step 13: Clear Browser Cache (Hue only)
Step 1: Collect Upgrade Information
- Host credentials. You must have SSH access and be able to log in using a root account or an account that has password-less sudo permission.
- The version of Cloudera Manager used in your cluster. Go to .
- The version of the JDK deployed in the cluster. Go to .
- The version of CDH. The CDH version number displays next to the cluster name on the Home page.
- Whether the cluster was installed using parcels or packages. This information displays next to the CDH version on the Home page of Cloudera Manager.
- The services enabled in your cluster. Go to .
- Operating system type and version. Go to Hosts and click on a hostname in the list. The operating system type and version displays in the Distribution row in the Details section.
- Database information for the databases used by Sqoop, Oozie, Hue, Hive Metastore, and Sentry Server (information is only required if theses services are enabled in the cluster).
Gather the following information:
- Type of database (PostgreSQL, Embedded PostgreSQL, MySQL, MariaDB, or Oracle)
- Hostnames of the databases
- Credentials for the databases
To locate database information:- Sqoop, Oozie, and Hue – Go to .
- Hive Metastore – Go to the Hive service, select Configuration, and select the Hive Metastore Database category.
- Sentry – Go to the Sentry service, select Configuration, and select the Sentry Server Database category.
Step 2: Complete Pre-Upgrade Steps
Step 3: Upgrade Unmanaged Components
Step 4: Stop Cluster Services
- On the
to the right of the cluster name and select Stop.
tab, click - Click Stop in the confirmation screen. The Command Details window
shows the progress of stopping services.
When All services successfully stopped appears, the task is complete and you can close the Command Details window.
Step 5: Back up the HDFS Metadata on the NameNode
[Not required for CDH maintenance release upgrades.]
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.2 or 5.3 to 5.4 or higher
- Go to the HDFS service.
- Click the Configuration tab.
- In the Search field, search for "NameNode Data Directories" and note the value.
- On the active NameNode host, back up the directory listed in the NameNode Data Directories property. If more than one is
listed, make a backup of one directory, becaues each directory is a complete copy. For example, if the NameNode data directory is /data/dfs/nn, do the following as
root:
# cd /data/dfs/nn # tar -cvf /root/nn_backup_data.tar .
You should see output like this:
./ ./current/ ./current/fsimage ./current/fstime ./current/VERSION ./current/edits ./image/ ./image/fsimage
If a file with the extension lock exists in the NameNode data directory, the NameNode most likely is still running. Repeat the steps, beginning with shutting down the NameNode role.
Step 6: Back Up Databases

Service | Where to find database information |
---|---|
Sqoop | Go to Database category. | and select the
Hue | Go to Database category. | and select the
Oozie | Go to Database category. | and select the
Cloudera Navigator Audit Server | Go to Database category. | and select the
Cloudera Navigator Metadata Server | Go to Database category. | and select the
Activity Monitor | Go to Database category. | and select the
Reports Manager | Go to Database category. | and select the
Sentry Server | Go to Sentry Server Database category. | and select the
Hive Metastore | Go to Hive Metastore Database category. | and select the
- If not already stopped, stop the service:
- On the
to the right of the service name and select Stop.
tab, click - Click Stop in the next screen to confirm. When you see a Finished status, the service has stopped.
- On the
- Back up the database. See Backing Up Databases for detailed instructions for each supported type of database.
- Restart the service:
- On the
to the right of the service name and select Start.
tab, click - Click Start that appears in the next screen to confirm. When you see a Finished status, the service has started.
- On the
Step 7: Upgrade Managed Components
Use one of the following strategies to upgrade CDH 5:
Use the Cloudera 1-Click Package
- Check whether you have the CDH 5 "1-click" repository installed by running the following command on each cluster host:
- RHEL/CentOS-compatible and SLES
-
rpm -q CDH 5-repository
If you are upgrading from CDH 5 Beta 1 or higher, and you used the "1-click" package for the previous CDH 5 release, you should see:
CDH5-repository-1-0
In this case, skip to Step install_upgrade_to_cdh5x_packages.html#concept_umd_wfj_rx_unique_2__install-packages_unique_2, Install the CDH packages. If instead you see:
package CDH 5-repository is not installed
proceed with Step install_upgrade_to_cdh5x_packages.html#concept_umd_wfj_rx_unique_2__install-1-click_unique_2, Install the 1-click package.
- Ubuntu and Debian
-
dpkg -l | grep CDH 5-repository
If the repository is installed, skip to Step install_upgrade_to_cdh5x_packages.html#concept_umd_wfj_rx_unique_2__install-packages_unique_2, Install the CDH packages; otherwise proceed with Step install_upgrade_to_cdh5x_packages.html#concept_umd_wfj_rx_unique_2__install-1-click_unique_2, Install the 1-click package.
- Install the CDH5 "1-click" package. If the CDH 5 "1-click" repository is not already installed
on each host in the cluster, follow the instructions below for that host's operating system.
- RHEL compatible
-
- Download and install the "1-click Install" package on each cluster host.
- Download the CDH 5 "1-click Install" package (or RPM).
Click the appropriate RPM and Save File to a directory with write access (for example, your home directory).
OS Version Link to CDH 5 RPM RHEL/CentOS/Oracle 5 RHEL/CentOS/Oracle 5 link RHEL/CentOS/Oracle 6 RHEL/CentOS/Oracle 6 link RHEL/CentOS/Oracle 7 RHEL/CentOS/Oracle 7 link - Install the RPM for all RHEL versions:
$ sudo yum --nogpgcheck localinstall cloudera-cdh-5-0.x86_64.rpm
- Download the CDH 5 "1-click Install" package (or RPM).
- Optionally add a repository key. Using a repository key helps to verify that you are using a signed version of the
package. If you add a repository key, you can omit the --nogpgcheck option when running yum commands. Run the following command to
add the repository key:
- Red Hat/CentOS/Oracle 5
-
$ sudo rpm --import https://archive.cloudera.com/cdh5/redhat/5/x86_64/cdh/RPM-GPG-KEY-cloudera
- Red Hat/CentOS/Oracle 6
-
$ sudo rpm --import https://archive.cloudera.com/cdh5/redhat/6/x86_64/cdh/RPM-GPG-KEY-cloudera
- Download and install the "1-click Install" package on each cluster host.
- SLES
-
- Download and install the "1-click Install" package on each cluster host:
- Download the CDH 5 "1-click Install" package.
Download the RPM file, choose Save File, and save it to a directory to which you have write access (for example, your home directory).
- Install the RPM:
$ sudo rpm -i cloudera-cdh-5-0.x86_64.rpm
- Update your system package index by running the following:
$ sudo zypper refresh
- Download the CDH 5 "1-click Install" package.
- Optionally add a repository key. Using a repository key helps to verify that you are using a signed version of the
package.
$ sudo rpm --import https://archive.cloudera.com/cdh5/sles/11/x86_64/cdh/RPM-GPG-KEY-cloudera
- Download and install the "1-click Install" package on each cluster host:
- Ubuntu and Debian
-
- Download and install the "1-click Install" package on each cluster host:
- Download the CDH 5 "1-click Install" package:
OS Version Package Link Jessie Jessie package Wheezy Wheezy package Precise Precise package Trusty Trusty package - Install the package by doing one of the following:
- Choose Open with in the download window to use the package manager.
- Choose Save File, save the package to a directory to which you have write access (for example, your home directory), and install it from the command line.
For example:
sudo dpkg -i cdh5-repository_1.0_all.deb
- Download the CDH 5 "1-click Install" package:
- (Optionally) add a repository key (Using a repository key helps to verify that you are using a signed version of
the package.):
- Ubuntu Trusty
$ curl -s https://archive.cloudera.com/cdh5/ubuntu/trusty/amd64/cdh/archive.key | sudo apt-key add -
- Ubuntu Precise
$ curl -s https://archive.cloudera.com/cdh5/ubuntu/precise/amd64/cdh/archive.key | sudo apt-key add -
- Debian Wheezy
$ curl -s https://archive.cloudera.com/cdh5/debian/wheezy/amd64/cdh/archive.key | sudo apt-key add -
- Ubuntu Trusty
- Download and install the "1-click Install" package on each cluster host:
- Install the CDH packages by running the following command on all cluster hosts:
Note:
- Installing these packages also installs all the other CDH packages required for a full CDH 5 installation.
- Kudu is only supported on a subset of the operating systems supported by CDH. These are: RHEL/CentOS 6, RHEL/CentOS 7, SLES 12 SP1, Ubuntu 14.04, 16.04, Debian 8.2, 8.4. Remove the kudu package from the command if you are installing on any other operating systems.
- RHEL compatible
-
$ sudo yum clean all $ sudo yum install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hadoop-kms hbase hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kudu kite llama mahout oozie parquet pig pig-udf-datafu search sentry solr solr-mapreduce spark-python sqoop sqoop2 whirr zookeeper
- SLES
-
$ sudo zypper clean --all $ sudo zypper install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hadoop-kms hbase hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kudu kite llama mahout oozie parquet pig pig-udf-datafu search sentry solr solr-mapreduce spark-python sqoop sqoop2 whirr zookeeper
- Ubuntu and Debian
-
$ sudo apt-get update $ sudo apt-get install avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-httpfs hadoop-kms hbase hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kudu kite llama mahout oozie parquet pig pig-udf-datafu search sentry solr solr-mapreduce spark-python sqoop sqoop2 whirr zookeeper
Use Operating System Package Management Tools
- Use your operating system's package management tools to update all packages to the latest version using standard repositories. This approach minimizes the amount of configuration
required and uses the simplest commands. This can take a considerable amount of time if you have not upgraded the system recently. To update all packages on your system, run the following command on
each cluster host:
- RHEL
-
$ sudo yum update
- SLES
-
$ sudo zypper up
- Ubuntu or Debian
-
$ sudo apt-get upgrade
Use a Specific Set of Packages
To upgrade managed components to a specific version of CDH, specify the packages you want to use for the upgrade. Follow the procedure at Upgrade Managed Components Using a Specific Set of Packages and then continue with the procedures in this topic.
Step 8: Update Symlinks for the Newly Installed Components
$ sudo service cloudera-scm-agent restart
Step 9: Run the Upgrade Wizard
- If you cluster has Kudu installed, stop the Kudu services before performing the steps in this section.
- Log in to the Cloudera Manager Admin console.
- From the
next to the cluster name and select Upgrade Cluster. The Upgrade Wizard starts.
tab, click - In the Choose Method field, select the Use Packages option.
- In the Choose CDH Version (Packages) field, specify the CDH version of the packages you have installed on your cluster. Click Continue.
- Read the notices for steps you must complete before upgrading, click the Yes, I ... checkboxes after completing the steps, and click Continue.
- Cloudera Manager checks that cluster hosts have the correct software installed. If the packages have not been installed, a warning displays to that effect. Install the missing packages and click Retry. When there are no errors, click Continue.
- The Host Inspector runs. Correct any errors displayed and click Continue.
The Choose Upgrade Procedure screen displays the available types of upgrades:
- Full Cluster Restart - Cloudera Manager performs all service upgrades and restarts the cluster.
- Manual upgrade Cloudera Manager configures the cluster to the specified CDH version but performs no upgrades or service restarts. Manually upgrading is
difficult and for advanced users only. To perform a manual upgrade:
- Select the Let me upgrade the cluster checkbox.
- Click Continue.
- See Performing Upgrade Wizard Actions Manually for the required steps.
- Select Full Cluster Restart.
- Click Continue. The Upgrade Cluster Command screen
displays the result of the commands run by the wizard as it shuts down all services, upgrades services, deploys client configuration files, and restarts services. If any of the steps fails or if you
click the Abort button, the Retry button at the top right is enabled.
Click Retry to retry the step and continue the wizard, or click the Cloudera Manager logo to return to the tab and manually perform the failed step and all following steps. See Performing Upgrade Wizard Actions Manually.
- Click Continue. The wizard reports the result of the upgrade.
- Click Finish to return to the Home page.
Step 10: Recover from Failed Steps or Perform a Manual Upgrade
The actions performed by the upgrade wizard are listed in Performing Upgrade Wizard Actions Manually. If any of the steps in the Upgrade Cluster Command screen fail, complete the steps as described in that section before proceeding.
Step 11: Finalize the HDFS Metadata Upgrade
[Not required for CDH maintenance release upgrades.]
- CDH 5.0 or 5.1 to 5.2 or higher
- CDH 5.2 or 5.3 to 5.4 or higher
To determine if you can finalize, run important workloads and ensure that they are successful. Once you have finalized the upgrade, you cannot roll back to a previous version of HDFS without using backups. Verifying that you are ready to finalize the upgrade can take a long time.
- Deleting files does not free up disk space.
- Using the balancer causes all moved replicas to be duplicated.
- All on-disk data representing the NameNodes metadata is retained, which could more than double the amount of space required on the NameNode and JournalNode disks.
- Go to the HDFS service.
- Click the Instances tab.
- Select the NameNode instance. If you have enabled high availability for HDFS, select NameNode (Active).
- Select and click Finalize Metadata Upgrade to confirm.
Step 12: Exit Maintenance Mode
If you entered maintenance mode during this upgrade, exit maintenance mode.
Step 13: Clear Browser Cache (Hue only)
If you have enabled the Hue service in your upgraded cluster, users may need to clear the cache in their Web browsers before accessing Hue.
<< Upgrading to CDH 5.x Using Parcels | ©2016 Cloudera, Inc. All rights reserved | Upgrade Managed Components Using a Specific Set of Packages >> |
Terms and Conditions Privacy Policy |