Hive installation in cluster

Inside hadoop cluster, Where hive is installed? As per my understanding, hive is installed in edge computer and it communicates with Metastore DB to get metadata and later jar file be created with mapreduce jobs. This will be submitted to cluster.
What about other nodes master nodes/data nodes? Hive installed in all these nodes?

Correct me if i am wrong? Explain this.

Thanks & Regards