Created
July 8, 2013 06:33
-
-
Save futoase/5946648 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Cloudera repositories | |
sudo sh -c 'echo "deb http://archive.cloudera.com/debian `lsb_release -c -s`-cdh3 contrib" > /etc/apt/sources.list.d/cloudera.list' | |
sudo sh -c 'echo "deb-src http://archive.cloudera.com/debian `lsb_release -c -s`-cdh3 contrib" >> /etc/apt/sources.list.d/cloudera.list' | |
wget -q -O - http://archive.cloudera.com/debian/archive.key | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -y install hadoop | |
# Install Hue | |
sudo apt-get -y install hadoop-0.20-conf-pseudo-hue | |
# Install Sqoop | |
sudo apt-get -y install sqoop | |
# Install Hive (already installed by Hue but sqoop needs the "hive" command which is missing) | |
sudo apt-get -y install hadoop-hive | |
sudo -u postgres createuser -S -D -R -P hive | |
sudo -u postgres createdb -O hive hive | |
# Next step is to configure /etc/hive/conf/hive-site.xml to use a database (PostgreSQL) as a metastore | |
# See here for instructions: http://wiki.apache.org/hadoop/Hive/AdminManual/MetastoreAdmin#Local_Metastore | |
# and change hive_conf_dir /etc/hue/hue-beeswax.ini to hive_conf_dir=/etc/hive/conf | |
# This assumes you used 'hive' as the password for the hive PostgreSQL account | |
wget http://gist.github.com/raw/485836/512357fef1be0ac9cf8596770939355fc61a4d1c/hive-site.xml | |
sudo mv hive-site.xml /etc/hive/conf | |
sudo chown root:root /etc/hive/conf/hive-site.xml | |
wget http://gist.github.com/raw/485836/e32b00bc69744509123ef584be226328c37ccf77/hue-beeswax.ini | |
sudo mv hue-beeswax.ini /etc/hue | |
# Now we have to download and install the PostgreSQL JDBC driver for Sqoop | |
wget http://jdbc.postgresql.org/download/postgresql-8.4-701.jdbc4.jar | |
sudo mv postgresql-8.4-701.jdbc4.jar /usr/lib/hadoop-0.20/lib/ | |
sudo chown -R hadoop:hadoop /usr/lib/hadoop-0.20/lib/postgresql-8.4-701.jdbc4.jar | |
# Start Hadoop | |
# Web interfaces on ports 50070 (HDFS), 50030 (Map/Reduce) and 8088 (Hue) | |
for x in /etc/init.d/hadoop-0.20-*; do sudo $x start; done | |
sudo /etc/init.d/hue start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment