How to Install / Launch Hadoop?

swarq

Katılımcı Üye
1 May 2020
335
185
Beacon Hills
Today I told you how Hadoop was founded.


First of all, you will need to download Hadoop. You can install it to the terminal from the address below or with the command index.

https://downloads.apache.org/hadoop/core/

To install in the terminal;


Code:

cd /usr/local

Code:

sudo wget https://www.apache.org/dist/hadoop/core/hadoop-2.7.3/hadoop-2.6.0.tar.gz

Code:

sudo tar xzf hadoop-2.7.3.tar.gz

Code:

sudo mv hadoop-2.7.3 hadoop


Code:

sudo chown -R hduser:hadoop hadoop

Hadoop Commands

We write the below code to the terminal to access the Hadoop commands.

Code:

sudo nano $HOME/.bashrc


We need to add the below commands to the end of the file to be opened.

Code:

export JAVA_HOME=/usr/lib/jvm/java-8-oracle


Code:

export HADOOP_HOME=/usr/local/hadoop

hadoop-env.sh Setting

For the Hadoop env.sh setting, we are entering the below code directories.

Code:

sudo nano /usr/local/hadoop/etc/hadoop/hadoop-env.sh

We export the Java_home index in the opened file.

Code:

export JAVA_HOME=/usr/lib/jvm/java-8-oracle


Perfection the Hadoop Global Settings


We write the following code index to our terminal to make the general settings. By writing this code, we actually open the core-site.xml file which we will make the general settings.

Code:

sudo nano /usr/local/hadoop/etc/core-site.xml


Code:

<configuration></configuration>

We are pasting the below codes between these tags.

Code:

<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>


Hadoop HDFS settings

First of all, we write this code index to our terminal. By writing this code index, we run our file named hdfs-site.xml.

Code:

sudo nano /usr/local/hadoop/etc/hdfs-site.xml

In the open indexes, you need to make the settings that I show with blue below.

Code:
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:/usr/local/hadoop_tmp/hdfs/namenode</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:/usr/local/hadoop_tmp/hdfs/datanode</value>
</property>
</configuration>

Hadoop MapReduce settings

First of all, we are pasting the below code into the terminal. With this code, we load mapred-site.xml.

Code:

sudo nano /usr/local/hadoop/etc/mapred-site.xml



Then we are making the edits I show with blue.

Code:

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>

Then we are uploading the yarn-site.xml file.

Code:

sudo nano /usr/local/hadoop/etc/yarn-site.xml


We are making the below blue edits.

Code:
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>

Hadoop NameNode Formatting

We are entering the following command in the terminal and enter the index where Hadoop is.

Code:

cd /usr/local/hadoop

Then we are doing the reset by entering the below command.

Code:

./bin/hdfs namenode -format

How to run Hadoop?

After opening our terminal, we are writing the below code directory.

Code:

/usr/local/hadoop/sbin/start-all.sh

After running this command, we will direct localhost: 8088 to this address and access in the panel.

Panel example will prelude

8vQt8I.png


Source:https://www.turkhackteam.org/hadoop/1978730-hadoop-nasil-kurulur-baslatilir.html





 
Son düzenleme:
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.