What is the conventional directory to install Hadoop into?
Matthew Martinez
Sooo... Hadoop doesn't have an installer, so can't use apt for it... Still pretty new at ubuntu stuff... I realize I can install it anywhere, but is there an established convention to be followed for its home directory?
32 Answers
Hadoop can be installed as a snap package in all currently supported versions of Ubuntu. Open the terminal and type:
sudo snap install hadoop --channel=latest/betaThis snap installs Hadoop 2.7.3 from the Apache Bigtop 1.2.0 release.
As you can install it in any dir you want. but there's a convention you can use. In Linux, most user applications are installed in /opt. If you use Cloudera/Hortonworks distribution. Hadoop and all the stack are installed in /usr/hdp/hdp_version/spark/{bin/etc/examples/...}
So it depends on you. If you're going to have multiple version for hadoop, and you are going to use them
/opt/hadoop/v2/apache-hadoop-2.x/ /opt/hadoop/v3/apache-hadoop-3.x/
Also. Hadoop configuration can be linked in /etc/ as well. so you can soft link your actual configuration of hadoop/spark in /etc.
as /etc is used for most of configuration. ln -s /opt/hadoop/v3/apache-hadoop-3.1/confi /etc/hadoop3
so you can change your configuration /etc/hadoop3/[ from /etc instead without the need to know where's the location of binaries.