Skip to content

Instantly share code, notes, and snippets.

@jniltinho
Last active December 13, 2023 06:04
Show Gist options
  • Save jniltinho/166a7e967be0117f4366b30ef510f055 to your computer and use it in GitHub Desktop.
Save jniltinho/166a7e967be0117f4366b30ef510f055 to your computer and use it in GitHub Desktop.
Install Hadoop on OpenSUSE 42.2
#!/bin/bash
### Install Hadoop + JRE8 on OpenSUSE 64Bits
### https://www.vivaolinux.com.br/artigo/Instalando-Apache-Hadoop?pagina=2
### http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/
### http://thepowerofdata.io/setting-up-a-apache-hadoop-2-7-single-node-on-ubuntu-14-04/
### http://www.scratchtoskills.com/install-hadoop-2-7-2-on-ubuntu-15-10-single-node-cluster/
### http://pingax.com/install-hadoop2-6-0-on-ubuntu/
## Install Rysnc
zypper in -y rsync
echo '# disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1' >> /etc/sysctl.conf
## Instalando JAVA JRE 8
cd /usr/local/
echo "Download JAVA JRE Package..."
wget --header 'Cookie: oraclelicense=a' http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jre-8u121-linux-x64.tar.gz
tar -xvf jre-8u121-linux-x64.tar.gz
mv jre1.8.0_121 java && rm -f jre-8u121-linux-x64.tar.gz
echo 'JAVA_HOME=/usr/local/java
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH' >> /etc/profile
source /etc/profile
## Instalando Hadoop 2.7.3
groupadd hadoop && useradd -M -g hadoop -d /usr/local/hadoop hduser
cd /usr/local/
wget http://ftp.unicamp.br/pub/apache/hadoop/common/hadoop-2.7.3/hadoop-2.7.3.tar.gz
tar -xvf hadoop-2.7.3.tar.gz
mv hadoop-2.7.3 hadoop && rm -f hadoop-2.7.3.tar.gz
mkdir /usr/local/hadoop/input
cp /usr/local/hadoop/etc/hadoop/*.xml /usr/local/hadoop/input/
mkdir -p /usr/local/hadoop/hdfs/namenode
mkdir -p /usr/local/hadoop/hdfs/datanode
echo 'export PATH=$PATH:/usr/local/hadoop/bin:/usr/local/hadoop/sbin' >> /usr/local/hadoop/.bashrc
## Edite Files
## /usr/local/hadoop/etc/hadoop/core-site.xml
## /usr/local/hadoop/etc/hadoop/yarn-site.xml
cp /usr/local/hadoop/etc/hadoop/mapred-site.xml.template /usr/local/hadoop/etc/hadoop/mapred-site.xml
## Edite Files
## /usr/local/hadoop/etc/hadoop/mapred-site.xml
## /usr/local/hadoop/etc/hadoop/hdfs-site.xml
chown -R hduser:hadoop /usr/local/hadoop
su - hduser
ssh-keygen -t rsa -P ""
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
start-all.sh
#bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.7.3.jar grep ~/input ~/grep_example 'principal[.]*'
@jniltinho
Copy link
Author

jniltinho commented May 3, 2020

@jonnathanweber

pessimo tutorial

Faz um melhor então bonitão.

Dúvido você fazer um tutorial foda do Hadoop @jonnathanweber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment