Building an RPM

Download SRPMs from The source RPMs for CDH 5 reside at, or Run the following commands as a non-root user, substituting the particular SRPM that you intend to build:

$ export SRPM=hadoop-0.20-0.20.2+320-1.src.rpm
$ rpmbuild --nodeps --rebuild $SRPM                  # Builds the native RPMs
$ rpmbuild --nodeps --rebuild --target noarch $SRPM  # Builds the java RPMs

The built packages can be found in $HOME/rpmbuild/RPMS.