February 14, 2020

[Note] Install Mahout

Environment: Ubuntu 18 64-bit Server
Prerequisite: Hadoop


Down

$ wget http://archive.apache.org/dist/mahout/0.13.0/apache-mahout-distribution-0.13.0.tar.gz

Uncompress and install at /opt/mahout

$ vi .bashrc
export HADOOP_CONF_DIR=${HADOOP_HOME}/etc/hadoop
export MAHOUT_HOME=/opt/mahout
export PATH=$PATH:$MAHOUT_HOME/bin
# use local
#export MAHOUT_LOCAL=true
# use with hadoop
export MAHOUT_LOCAL=""

$ . ~/.bashrc


Test

$ mkdir test; cd test
$ wget http://www.grouplens.org/system/files/ml-100k.zip
$ unzip ml-100k.zip
$ cd ml-100k
$ hdfs dfs -mkdir -p /user/hduser
$ hadoop fs -put u.data u.data

$ mahout recommenditembased -s SIMILARITY_COOCCURRENCE –input u.data –output output.txt


More Info

https://www.tutorialspoint.com/mahout/mahout_introduction.htm


No comments: