MapR M3 Single-node Cluster Installation on CentOS 6

If you need a single-node MapR cluster and you are not able to use the official MapR sandbox image, you can use this guide to install MapR on a CentOS.

MapR Installation:

1. Add a file maprtech.repo to /etc/yum.repo.d/

1
2
3
4
5
6
7
8
9
10
11
12
13
[maprtech]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/v3.1.1/redhat/
enabled=1
gpgcheck=0
protect=1
[maprecosystem]
name=MapR Technologies
baseurl=http://package.mapr.com/releases/ecosystem/redhat
enabled=1
gpgcheck=0
protect=1

2. Installation.

1
2
3
4
5
6
wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh epel-release-*.rpm
wget http://package.mapr.com/releases/v3.1.1/redhat/mapr-setup
chmod 755 mapr-setup
./mapr-setup

3. Create a configuration file for single node environment

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Each Node section can specify nodes in the following format
# Node: disk1, disk2, disk3
# Specifing disks is optional. In which case the default disk information
# from the Default section will be picked up
[Control_Nodes]
#This is the hostname of the node. Run 'hostname' to get it.
CentOS65-001
[Data_Nodes]
[Client_Nodes]
[Options]
MapReduce = true
HBase = true
M7 = false
ControlNodesAsDataNodes = true
WirelevelSecurity = false
LocalRepo = false
[Defaults]
ClusterName = my.cluster.com
User = mapr
Group = mapr
Password = mapr
UID = 2000
GID = 2000
Disks = /dev/sdb
CoreRepoURL = http://package.mapr.com/releases
EcoRepoURL = http://package.mapr.com/releases/ecosystem
Version = 3.1.1
MetricsDBHost
MetricsDBUser
MetricsDBPassword
MetricsDBSchema

4. Run /opt/mapr-maprinstaller/bin/install. Follow the instructions, remember to load the configuration file above.

5. After installation, log in https://hostname:8443 with user mapr pwd mapr.

6. Register your license. Otherwise some services couldn’t launch.

7. After registration, reboot (or just simply stop all the MapR services, but I suggest you reboot) and start mapr services:

1
2
service mapr-zookeeper start
service mapr-warden start

8. Then you are good to go with MapR Hadoop! Try some examples.

1
hadoop jar /opt/mapr/hadoop/hadoop-0.20.2/hadoop-0.20.2-dev-examples.jar pi 2 50

Spark Installation

This part is from the original guide, with a few modifications.

1. Install Scala 2.10+

1
yum localinstall http://www.scala-lang.org/files/archive/scala-2.11.2.rpm

2. Install Spark

1
yum install mapr-spark-master

3. change the owner of spark dir to mapr (or warden cannot start spark due to file permission)

1
chown -R mapr:mapr /opt/mapr/spark

4. refresh warden to start spark

1
/opt/mapr/server/configure.sh -R

5. Edit the configuration of worker node as you wish. (default is localhost for single node)

1
vim /opt/mapr/spark/spark-1.0.2/conf/slaves

6. Start slave (spark master has been started by warden)

1
2
su mapr
/opt/mapr/spark/spark-1.0.2/sbin/start-slaves.sh

7. check spark-master website (http://hostname:8080/) to see if work nodes are set.

8. run spark-pi example

1
/opt/mapr/spark/spark-1.0.2/bin/run-example org.apache.spark.examples.SparkPi 10

^