Installing HDP Manually
Also available as:
PDF
loading table of contents...

Download Companion Files

We have provided a set of companion files, including script files (scripts.zip) and configuration files (configuration_files.zip), that you can download, fill in the lines marked "TODO," and use throughout this process.

To download and extract the files:

wget http://public-repo-1.hortonworks.com/HDP/tools/2.2.9.0/hdp_manual_install_rpm_helper_files-2.2.9.0.$BUILD.tar.gz

These are generic samples. Edit the lines marked "TODO" with values specific to your system.

Hortonworks strongly recommends that you copy usersAndGroups.sh and directories.sh to your ~/.bash_profile to set up these environment variables in your environment.

The following provides a snapshot of a sample script file to create Hadoop directories. This sample script file sources the files included in Companion Files.

#!/bin/bash 
./usersAndGroups.sh 
./directories.sh 

echo "Create datanode local dir" 
mkdir -p $DFS_DATA_DIR;

echo "Create namenode local dir" 
mkdir -p $DFS_NN_DIR;

echo "Create namenode local dir"
mkdir -p $DFS_SN_DIR;
chown -R $HDFS_USER:$HADOOP_GROUP $DFS_DATA_DIR;
chmod -R 750 $DFS_DATA_DIR;

echo "Create yarn local dir" 
mkdir -p $YARN_LOCAL_DIR;
chown -R $YARN_USER:$HADOOP_GROUP $YARN_LOCAL_DIR;
chmod -R 755 $YARN_LOCAL_DIR;

echo "Create yarn local log dir" 
mkdir -p $YARN_LOCAL_LOG_DIR;
chown -R $YARN_USER:$HADOOP_GROUP $YARN_LOCAL_LOG_DIR; 
chmod -R 755 $YARN_LOCAL_LOG_DIR;

echo "Create zookeeper local data dir" 
mkdir -p $ZOOKEEPER_DATA_DIR; 
chown -R $ZOOKEEPER_USER:$HADOOP_GROUP $ZOOKEEPER_DATA_DIR; 
chmod -R 755 $ZOOKEEPER_DATA_DIR; 
[Note]Note

This is just one example of the sample scripts you can write with the companion files.