• No products in the cart.

Mahout Installation

 

Prerequisites: Hadoop should be installed and Java.

Tested on Ubuntu-14.04 LTS using hadoop-2.6.0 and JDK-1.7

Follow the below steps: hduser is the dedicated hadoop user. We will install mahout under hduser.

Step 1: Login Through Hadoop’s User

    $ su - hduser

Step 1.1: Uninstall Maven

If you have not installed maven yet then skip this step, otherwise first check your maven version using the command given below:

    $ mvn -version

If your maven version is less than 3.3.3, then just uninstall it using the commands given below:

  • To remove just maven package itself from Ubuntu
        $ sudo apt-get remove maven
  • Uninstall maven and it’s dependent packages
        $ sudo apt-get remove --auto-remove maven
  • Purging maven
        $ sudo apt-get purge maven
  • To delete configuration and/or data files of maven and it’s dependencies from Ubuntu Trusty then execute:
        $ sudo apt-get purge --auto-remove maven

Step 2: Install Maven

You will need maven in the range [3.3.3], for the successful building of mahout using maven. So, download maven-3.3.3 and configure using the steps given below:

Step 2.1: Download Maven Release

Download the **apache-maven-3.3.3-bin.tar.gz** file using the [link](https://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/) and save it like the image given below:

Step 2.2: Extract the downloaded file

Put your root user name at the place of user in the below command.

    $ cd /home/user/Downloads
    $ sudo tar -zxvf apache-maven-3.3.3-bin.tar.gz

Step 2.3: Move Extracted folder into Installation Directory

    $ sudo mv apache-maven-3.3.3 /usr/local/maven

Step 2.4: Edit bashrc file

    $ sudo nano ~/.bashrc

Add following line into it :

    #MAVEN VARIABLES START
    export M2_HOME=/usr/local/maven
    export M2=$M2_HOME/bin
    export PATH=$PATH:$M2_HOME/bin
    #MAVEN VARIABLES END

Use Ctrl+X and Y to save.

Run this command to make this change permanent in .bashrc:

    $ source ~/.bashrc

Step 2.5: Check for Maven Version:

    $ mvn -version

You will get the output like the image given below:


Step 3: Install Mahout

In the below command, hduser is the dedicated hadoop user. You will be going to install mahout under hduser.

Step 3.1: Login Through Hadoop’s User

    $ su - hduser

Download Mahout

Download the **mahout-distribution-0.8-src.tar.gz** file using this [link](https://archive.apache.org/dist/mahout/0.8/) 

Save the file as the image given below:

Step 3.2: Extract the downloade file

Put your root user name at the place of user in the below command.

    $ cd /home/user/Downloads
    $ sudo tar -zxvf mahout-distribution-0.8-src.tar.gz

Step 3.3: Move Extracted folder into Installation Directory

    $ sudo mv mahout-distribution-0.8 /usr/local/mahout

Step 3.4: Edit .bashrc file

    $ sudo nano ~/.bashrc

Add following line into it :

    #MAHOUT VARIABLES START
    export MAHOUT_HOME=/usr/local/mahout
    export PATH=$PATH:$MAHOUT_HOME/bin/
    #MAHOUT VARIABLES END

Use Ctrl+X and Y to save.

Run this command to make this change permanent in .bashrc:

    $ source ~/.bashrc

Step 3.5: Change file permission of the bin folder of Mahout to rwx:

    $ sudo chmod -R +rwx /usr/local/mahout/bin

Step 3.6: Build Mahout using Maven

    $ cd /usr/local/mahout
    $ sudo /usr/local/maven/bin/mvn -DskipTests install

It will take time in building process (almost half an hour). After the successful building, you will get the output like the image given below:

Step 3.7: Check your Installation

    $ cd /usr/local/mahout/bin
    $ mahout

If you get the output like the image given below, then you are done.

DV Analytics

DV Data & Analytics is a leading data science training and consulting firm, led by industry experts. We are aiming to train and prepare resources to acquire the most in-demand data science job opportunities in India and abroad.

Bangalore Center

DV Data & Analytics Bangalore Private Limited
#52, 2nd Floor:
Malleshpalya Maruthinagar Bengaluru.
Bangalore 560075
India
(+91) 9019 030 033 (+91) 8095 881 188
Email: info@dvanalyticsmds.com

Bhubneshwar Center

DV Data & Analytics Private Limited Bhubaneswar
Plot No A/7 :
Adjacent to Maharaja Cine Complex, Bhoinagar, Acharya Vihar
Bhubaneswar 751022
(+91) 8095 881 188 (+91) 8249 430 414
Email: info@dvanalyticsmds.com

top
© 2020. All Rights Reserved.