Skip to content

Instantly share code, notes, and snippets.

@anubhavsinha
Last active April 15, 2021 02:53
Show Gist options
  • Save anubhavsinha/97ca001257e5b7308edb to your computer and use it in GitHub Desktop.
Save anubhavsinha/97ca001257e5b7308edb to your computer and use it in GitHub Desktop.
Install single node Mesos ( Latest ) cluster on Centos 7.1
sudo yum update
sudo yum install -y tar wget
# Install Mesos dependencies
sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
#sudo vi /etc/yum.repos.d/wandisco-svn.repo and add the following content
#[WANdiscoSVN]
#name=WANdisco SVN Repo 1.9
#enabled=1
#baseurl=http://opensource.wandisco.com/centos/7/svn-1.9/RPMS/$basearch/
#gpgcheck=1
#gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco
sudo yum groupinstall -y "Development Tools"
sudo yum install -y git apache-maven python-devel java-1.7.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel
# Take the latest from git
# older versions have some bugs
# because of which Mesos is not able to create required directories when we run make install
# Also, automake has some issues with Ubuntu 14.04, due to which ./bootstrap fails.
# So use Centos 7.1
git clone https://git-wip-us.apache.org/repos/asf/mesos.git
# repository is about 200 MB
cd mesos
./bootstrap
mkdir build
cd build
../configure
make -j <number of cores> V=0
make check
sudo make install
# You can use this script to build Mesos and then copy the build to other nodes.
# Because building Mesos takes some time.
# create a directory for the Mesos replicated logs with read-write permissions
sudo mkdir –p /var/lib/mesos
sudo chown `whoami` /var/lib/mesos
# Now start the Master
./bin/mesos-master --work_dir=/var/lib/mesos
# and now the slave
./bin/mesos-slave.sh --master=127.0.0.1:5050
# You got a single node Mesos cluster running with one slave ready to run the frameworks.
# Run Python framework (Exits after successfully running some tasks.).
./src/examples/python/test-framework 127.0.0.1:5050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment