Created
July 2, 2013 07:49
-
-
Save dnozay/5907443 to your computer and use it in GitHub Desktop.
install hadoop on fedora (fc17)
This file contains 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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<!-- Put site-specific property overrides in this file. --> | |
<configuration> | |
<property> | |
<name>hadoop.tmp.dir</name> | |
<value>/app/hadoop/tmp</value> | |
<description>A base for other temporary directories.</description> | |
</property> | |
<property> | |
<name>fs.default.name</name> | |
<value>hdfs://localhost:54310</value> | |
<description>The name of the default file system. A URI whose | |
scheme and authority determine the FileSystem implementation. The | |
uri's scheme determines the config property (fs.SCHEME.impl) naming | |
the FileSystem implementation class. The uri's authority is used to | |
determine the host, port, etc. for a filesystem.</description> | |
</property> | |
</configuration> |
This file contains 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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<!-- Put site-specific property overrides in this file. --> | |
<configuration> | |
<property> | |
<name>dfs.replication</name> | |
<value>1</value> | |
<description>Default block replication. | |
The actual number of replications can be specified when the file is created. | |
The default is used if replication is not specified in create time. | |
</description> | |
</property> | |
</configuration> |
This file contains 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
#!/bin/sh | |
# install hadoop on a fedora distribution. | |
# credit goes to Michael Noll for original instructions in this tutorial: | |
# (http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/) | |
# tuned and hadoop'ted for fc17 | |
# NOTE: start-all.sh and other binaries are under /usr/sbin | |
# NOTE: configuration xml (*-site.xml) are under /etc/hadoop | |
cd /tmp | |
# step 1: download and local install | |
wget -O /tmp/hadoop.rpm http://apache.mirrors.hoobly.com/hadoop/common/hadoop-1.1.2/hadoop-1.1.2-1.x86_64.rpm | |
yum localinstall /tmp/hadoop.rpm | |
# step 2: fix user permissions / exec bits missing | |
adduser -g hadoop hduser | |
rpm -qpl hadoop.rpm | xargs chown hduser:hadoop | |
rpm -qpl hadoop.rpm | grep /usr/sbin/ | xargs chmod +x | |
# step 3: create ssh key | |
mkdir ~hduser/.ssh | |
chmod 0700 ~hduser/.ssh | |
ssh-keygen -t rsa -P "" -f ~hduser/.ssh/id_rsa -C hduser@localhost | |
cat ~hduser/.ssh/id_rsa.pub >> ~hduser/.ssh/authorized_keys | |
chown -R hduser:hadoop ~hduser/.ssh | |
# step 4: create hadoop root tempdir | |
mkdir -p /app/hadoop/tmp | |
chmod 750 /app/hadoop/tmp | |
chown hduser:hadoop /app/hadoop/tmp | |
# install jps alias if you don't use the oracle jdk. | |
if ! which jps >/dev/null 2>&1; then | |
alias jps='pgrep -lf java | cut -d" " -f1,3' | |
fi | |
# now follow the tutorial ... |
This file contains 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
<?xml version="1.0"?> | |
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> | |
<!-- Put site-specific property overrides in this file. --> | |
<configuration> | |
<property> | |
<name>mapred.job.tracker</name> | |
<value>localhost:54311</value> | |
<description>The host and port that the MapReduce job tracker runs | |
at. If "local", then jobs are run in-process as a single map | |
and reduce task. | |
</description> | |
</property> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment