您的位置:首页 > 运维架构 > Apache

apache mahout

2014-03-16 21:00 337 查看


ApacheMahout


Friday,20April2012


InstallingApacheMahoutonUbuntu

Hi..nicetoseeuguysinhere..thethoughtofputtinginatutorialcameontomewhenihadquiteatoughtimewhileinstallingMahout..itsnotdifficult..butudogetstuckatsmallittybittymistakeumakewhileintheinstallingprocess
ornotknowingtheexactdependenciesrequired..whichleadsyoutoerrorsandthenuendupinthegamesimilartoatreasurehunt..soletsstart..

Step1:INSTALLATIONOFSunJAVAJDK

thiswouldlooksimpleandquiteapettythingtodo..butifnotdoneinthecorrectwayleadstosomemajorissues..

1.InstallfromSynapticPackagemanager:

Mostofuswouldbedoingthat..whichisfine..

Systems-Administration-SynapticPackageManager--installsunjavajdk

butcheckthesunjavaupdate..ifthejdkisofolderversionithasgotfewbugsinitandinstallationofmahoutgetsintotrouble..thatswhathappenedtome..soiinstalledjdk1.6.0_26manuallythelatestversionfromthefollowing
website

2.Installationofjavamanually

Java
update26Download

1.Acceptthelicense

2.Downloadtheselfextractinginstallerfiledependingupoon64bit,32bit.orx86.

3.AftertheDownloadyouwouldseea.binfile

thewayihaveinstalledis

ganesh@ganesh-VPCEG2AEN:~$mkdirprograms

ganesh@ganesh-VPCEG2AEN:~$cdprograms

ganesh@ganesh-VPCEG2AEN:~/programs$bash../Downloads/jdk-6u26-linux-i586.bin

theabovecommandwouldunpackandintheenditwillaskyoutopressentertocontinue..atthatinstanceyouneedtopressenter.

ganesh@ganesh-VPCEG2AEN:~/programs$ln-sjdk1.6.0_26jdk

ganesh@ganesh-VPCEG2AEN:~/programs$ls-l

total4

lrwxrwxrwx1ganeshganesh112012-04-1213:55jdk->jdk1.6.0_26

drwxr-xr-x10ganeshganesh40962012-04-1213:52jdk1.6.0_26

ganesh@ganesh-VPCEG2AEN:~/programs$cd..

ganesh@ganesh-VPCEG2AEN:~/programs$sudogedit.bashrc

whenthe.bashrcfilewouldopen..settheJAVAHOMEbyaddingthefollowinglines

#SetJavaHome

exportJAVA_HOME=$HOME/programs/jdk

exportPATH=.:$JAVA_HOME/bin:$PATH

oncethisisdoneuhavefinishedtheprocedureofDownloading...InstallingandConfiguring..tocheckifitsinstalledornot..followthebelowcommand..

ganesh@ganesh-VPCEG2AEN:~$java-version

youshouldgetthefollowingoutput

javaversion"1.6.0_26"

Java(TM)SERuntimeEnvironment(build1.6.0_26-b03)

JavaHotSpot(TM)ServerVM(build20.1-b02,mixedmode)

oncejavaisdonewecannowgofurther..........

STEP2:INSTALLATIONOFMAVEN.

Onecaninstallmavenfromsynapticpackagemangerorbyrunningacommand

sudoapt-getinstallmaven2

butheretooihaveinstalledApachemaven3.0.4manuallybyfollowingthebelowmentionedprocedure...

Extractthedistributionarchive,i.e.apache-maven-3.0.4-bin.tar.gztothedirectoryyouwishtoinstallMaven3.0.4.Theseinstructionsassumeyouchose/usr/local/apache-maven.Thesubdirectoryapache-maven-3.0.4willbecreated
fromthearchive.
openthe.bashrcfileagain...andaddthefollowinglines

##############Apache-Maven#########

exportM2_HOME=/usr/local/apache-maven-3.0.4

exportM2=$M2_HOME/bin

exportPATH=$M2:$PATH

exportJAVA_HOME=$HOME/programs/jdk

3.MakesurethatJAVA_HOMEissettothelocationofyourJDK,e.g.exportJAVA_HOME=/usr/java/jdk1.5.0_02andthat$JAVA_HOME/binisinyourPATHenvironmentvariablee.(whichwehavealreadydonewhileinstallingJAVA)

4.Runmvn--versiontoverifythatitiscorrectlyinstalled.

oneshouldgetadisplayasshownbelow

ApacheMaven3.0.4(r1232337;2012-01-1714:14:56+0530)

Mavenhome:/usr/local/apache-maven-3.0.4

Javaversion:1.6.0_26,vendor:SunMicrosystemsInc.

Javahome:/home/ganesh/programs/jdk1.6.0_26/jre

Defaultlocale:en_IN,platformencoding:UTF-8

OSname:"linux",version:"2.6.35-22-generic",arch:"i386",family:"unix"

****note

ifyouaregettingconnectedthroughaproxyconnection,weneedtochangetheproxysettingsinsettingsfileofmaven..untilthisisdonemavendoesnotconnect..makesurethisisdone..

weneedtochangethesettingsinthesettings.xmlpageintheconfdirecotryoftheapachemaven,inmycase

ganesh@ganesh-VPCEG2AEN:~$cd/usr/local/apache-maven-3.0.4

ganesh@ganesh-VPCEG2AEN:/usr/local/apache-maven-3.0.4$cdconf

ganesh@ganesh-VPCEG2AEN:/usr/local/apache-maven-3.0.4/conf$ls

settings.xml

ganesh@ganesh-VPCEG2AEN:/usr/local/apache-maven-3.0.4/conf$sudogeditsettings.xml

oncethesettings.xmlpageopens

<!--proxy

|Specificationforoneproxy,tobeusedinconnectingtothenetwork.

<proxy>

<id>optional</id>

<active>true</active>

<protocol>http</protocol>

<username>putinyourusername</username>

<password>putinyourpassword</password>

<host>putinthehostaddress</host>

<port>port</port>

<nonProxyHosts>localhost</nonProxyHosts>

</proxy>

</proxies>

|-->

makesuretouncommentthecodelines.

3.INSTALLATIONOFHADOOP

thefollowingwebsiteprovidesabeautifultutorialofinstallingsinglenodehadoopcluster

Single
nodehadoopclustersetup

***makesurethatuhaveinstalledsshorelseyouwouldgetanerroras

ganesh@ganesh-VPCEG2AEN:~$sshlocalhost

ssh:connecttohostlocalhostport22:Connectionrefused

sotoavoidtheaboveerror

ganesh@ganesh-VPCEG2AEN:~$sudoapt-getinstallopenssh-server

sTEP4...finallytoINSTALLATIONOFMAHOUT:

1.gotothefollowingwebsitetodownloadmahoutsourcecode
http://www.apache.org/dyn/closer.cgi/lucene/mahout/
selectoneofthemahoutversionwhichare0.4,0.5,0.6..ihadselected0.6

andmakesurethatoutofsomanyzippedfilesintheredownloadthe.srczippedfile..thisisagaintheplaceweremanyofusmakeamistake...

2.checkifthefolderhasapom.xmlornot..itwouldbethereforsurebutmakesureucheckonce.

3.inmycaseihadDownloadedthefile,unzippeditnameditasmahoutandmovedto/usr/local.

followingarethecommands

ganesh@ganesh-VPCEG2AEN:~$cd/usr/local/mahout

ganesh@ganesh-VPCEG2AEN:/usr/local/mahout$mvninstall

youshouldseesomethingasbelow:





thenitwouldperformthetest..itsrecommendedthatthecompletetestsshouldbedoneandtheprocessshouldbecompletedforthefirsttimeinstallation..laterwhenwerunthemvninstallweuseacommandtoskipthetestswhich
is

mvninstall-Dmaven.test.skip=true.








oncethetestsaredoneandthemahoutisbuilt..wegetasuccessmsgasshowninthefigurebeow..





Congratulationsmahoutisinstalled...

PostedbyNiviat05:54


Email
ThisBlogThis!Share
toTwitterShare
toFacebook


6comments:



ratn10
September201206:31
Thanks

Nicetutorial
ReplyDelete



Nivi28
September201205:05
Thankyouratn:)

ReplyDelete



Gaurav...5
January201304:44
verynicetutorial...thanks
ReplyDelete



Nivi6
January201323:56
thankugaurav:)
ReplyDelete



Niraj
Shrestha26
April201308:52
gotfollowingerror:

Needhelptoresolve:

[ERROR]BUILDERROR

[INFO]------------------------------------------------------------------------

[INFO]Internalerrorinthepluginmanagerexecutinggoal'org.apache.mahout:mahout-collection-codegen-plugin:1.0:generate':Unabletofindthemojo'generate'(oroneofitsrequiredcomponents)intheplugin'org.apache.mahout:mahout-collection-codegen-plugin'

Badversionnumberin.classfile

ReplyDelete



Vigneesh
Manoharan6
November201309:21
Ivesuccessfullyinstalledwiththehelpofthistutorial.Butidon'tknowhowtoworkwiththis.Icouldn'tfindanygoodtutorialsalso.Ifanyoneknowssomegoodsitemeanskindlypostthelink.Thanksinadvance.
ReplyDelete

Addcomment

Load
more...

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: