Mesos Installation in CentOS 7.0


This post will walk through setting up a cluster which includes Apache Mesos.

Highly-available clusters will typically have multiple master nodes and any number of slave nodes. Each master node runs Apache Mesos and ZooKeeper (to provide leader election). Running three ZooKeeper nodes will allow one to fail and for the service to still be available (see ZooKeeper reliability for more information). We recommend running at least three master nodes for a highly-available configuration. Run the steps below on each master node.

Master Node Setup:

The easiest way to install Mesos is via the GitHub repositories. Alternatively, you can download the latest deb or rpm directly from the Mesosphere downloads page and install it manually.

Mesosphere has official package repositories which connect directly to the native package management tools of your favorite Linux distribution — namely apt-get and yum — to install Mesos on top of the most common Linux distributions (RedHat, CentOS, Ubuntu and Debian).

Step 1: Install mesos and zookeeper in master machines:

# Add the repository

$sudo rpm -Uvh
$sudo yum -y install mesos marathon
$sudo yum -y install mesosphere-zookeeper

Step 2: Configuration

Set /var/lib/zookeeper/myid to a unique integer between 1 and 255 on each node.

$sudo nano /var/lib/zookeeper/myid
#set 1


Start Zookeeper

$sudo systemctl start zookeeper


Step 3: Set mesos master  address in mesos zookeeper setting:

On each node, replacing the IP addresses below with each master’s IP address, set/etc/mesos/zk to:

$sudo nano /etc/mesos/zk

Step 4: Disable mesos-slave service on each master servers.

$sudo systemctl stop mesos-slave.service
$sudo systemctl disable mesos-slave.service

Step 5:  Restart all the master node using following cmd.

$sudo systemctl restart mesos-master


Master Slave Setup:

Step 6: Install mesos in all other nodes:  Repeat step 1, add the repository

sudo rpm -Uvh
sudo yum -y install mesos

Step 7:  On each node, replacing the IP addresses below with each master’s IP address, set /etc/mesos/zk to: zk://,,

sudo nano /etc/mesos/zk

Step 8: Disable mesos-master on each slave nodes:

sudo systemctl stop mesos-master.service
sudo systemctl disable mesos-master.service

Step 9: Restart all the slave nodes

sudo systemctl restart mesos-slave


Verifying Installation

If the packages were installed and configured correctly, you should be able to access the Mesos console at http://<master-ip>:5050

For example access Mesos through web interface:


In this first post of a series detailing the expansion of a Mesos environment for multi-node.






2 thoughts on “Mesos Installation in CentOS 7.0

  1. You are so interesting! I do not suppose I’ve truly read anything like this before.
    So good to discover somebody with unique thoughts
    on this subject. Really.. thanks for starting this up.
    This website is something that is required on the web, someone with
    a little originality!

Leave a Reply

Your email address will not be published. Required fields are marked *