apache mahout. prerequisites for building mahout java jdk 1.6 maven 3.0 or higher ( ). subversion...

Post on 13-Dec-2015

229 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Apache Mahout

Prerequisites for Building MAHOUT

• Java JDK 1.6• Maven 3.0 or higher (

http://maven.apache.org/ ).• Subversion (optional)• Hadoop (used by Mahout)• Mahout (0.9)

Install maven 3

1. Open terminal ( Ctrl + Alt + T ).2. Install maven 3.

sudo apt-get install maven 3.

3. Verify that the installation is successful.mvn -v

ssh-key

• Setup ssh server– $sudo apt-get install openssh-server

• Setup Public/private key for accessing serverwithout passwd

– $ssh-keygen –t rsa– $cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys– $ssh localhost– $exit

Hadoop

• To install Hadoop on your local box, go to http://www.apache.org/dyn/closer.cgi/hadoop/common/ and download hadoop

• Uncompress the archive:tar xvfz hadoop-1.1.2-bin.tar.gz

• Edit the file conf/hadoop-env.sh and add the following line:

export JAVA_HOME=<JDK DIRECTORY>

Hadoop

To configure HDFS, edit the file conf/core-site.xml and add the following property in configuration:

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

Hadoop

Then format the HDFS filesystem:hadoop namenode -format

Run hadoopstart-all.sh

Mahout

• Change the directory where mahout is located cd mahout

• Build mahout mvn install

Mahout

Test

• copy the file u.data to HDFS:

• To run the mahout recommender, type:

Test

Output

Output

top related