Project: Apache Mesos (Orchestration & Management / Scheduling & Orchestration)
File: building.md

title: Apache Mesos - Building layout: documentation There are different ways you can get Mesos: 1\. Download the latest stable release from (*Recommended*) $ wget https://downloads.apache.org/mesos/1.11.0/mesos-1.11.0.tar.gz $ tar -zxf mesos-1.11.0.tar.gz 2\. Clone the Mesos git (*Advanced Users Only*) $ git clone https://gitbox.apache.org/repos/asf/mesos.git NOTE: If you have problems running the above commands, you may need to first run through the System Requirements section below to install the `wget`, `tar`, and `git` utilities for your system. Mesos runs on Linux (64 Bit) and Mac OS X (64 Bit). To build Mesos from source, GCC 4.8.1+ or Clang 3.5+ is required. On Linux, a kernel version >= 2.6.28 is required at both build time and run time. For full support of process isolation under Linux a recent kernel >= 3.10 is required. The Mesos agent also runs on Windows. To build Mesos from source, follow the instructions in the section. Make sure your hostname is resolvable via DNS or via `/etc/hosts` to allow full support of Docker's host-networking capabilities, needed for some of the Mesos tests. When in doubt, please validate that `/etc/hosts` contains your hostname. Following are the instructions for stock Ubuntu 14.04. If you are using a different OS, please install the packages accordingly. $ sudo apt-get update $ sudo apt-get install -y tar wget git $ sudo apt-get install -y openjdk-7-jdk $ sudo apt-get install -y autoconf libtool $ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev Following are the instructions for stock Ubuntu 16.04. If you are using a different OS, please install the packages accordingly. $ sudo apt-get update $ sudo apt-get install -y tar wget git $ sudo apt-get install -y openjdk-8-jdk $ sudo apt-get install -y autoconf libtool $ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev zlib1g-dev iputils-ping Following are the instructions for Mac OS X El Capitan. When building Mesos with the Apple-provided toolchain, the Command Line Tools from XCode >= 8.0 are required; XCode 8 requires Mac OS X 10.11.5 or newer. $ xcode-select --install $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" $ brew install Caskroom/cask/java $ brew install wget git autoconf automake libtool subversion maven xz $ sudo easy_install pip $ pip install virtualenv When compiling on macOS 10.12, the following is needed: $ brew unlink subversion # (If already installed) $ brew install subversion $ ../configure $

Failed to obtain the IP address for '<hostname>'; the DNS service may not be able to resolve it: nodename nor servname provided, or not known NOTE: When upgrading from Yosemite to El Capitan, make sure to rerun `xcode-select --install` after the upgrade. Following are the instructions for stock CentOS 6.6. If you are using a different OS, please install the packages accordingly. $ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org $ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm $ sudo yum --enablerepo=elrepo-kernel install -y kernel-lt $ sudo sed -i 's/default=1/default=0/g' /boot/grub/grub.conf $ sudo reboot $ sudo yum install -y tar wget git which nss $ sudo wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo $ sudo rpm --import http://linuxsoft.cern.ch/cern/centos/7/os/x86_64/RPM-GPG-KEY-cern $ sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo $ sudo bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo <<EOF [WANdiscoSVN] name=WANdisco SVN Repo 1.8 enabled=1 baseurl=http://opensource.wandisco.com/centos/6/svn-1.8/RPMS/$basearch/ gpgcheck=1 gpgkey=http://opensource.wandisco.com/RPM-GPG-KEY-WANdisco EOF' $ sudo yum groupinstall -y "Development Tools" $ sudo yum install -y devtoolset-2-toolchain $ sudo yum install -y apache-maven python-devel python-six python-virtualenv 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 $ scl enable devtoolset-2 bash $ g++ --version # Make sure you've got GCC > 4.8! $ sudo yum install -y libcgroup $ sudo service cgconfig start Following are the instructions for stock CentOS 7.1. If you are using a different OS, please install the packages accordingly. $ sudo yum install -y tar wget git $ sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo $ sudo yum install -y epel-release $ sudo bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo <<EOF [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 EOF' $ sudo yum update systemd $ sudo yum groupinstall -y "Development Tools" $ sudo yum install -y apache-maven python-devel python-six python-virtualenv java-1.8.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel Follow the instructions in the section. $ cd mesos $ ./bootstrap $ mkdir build $ cd build $ ../configure $ make In order to speed up the build and reduce verbosity of the logs, you can append `-j <number of cores> V=0` to `make`. $ make check $ make install Mesos comes bundled with example frameworks written in C++, Java and Python. The framework binaries will only be available after running `make check`, as described in the *Building Mesos* section above. $ cd build $ ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos $ ./bin/mesos-agent.sh --master=127.0.0.1:5050 --work_dir=/var/lib/mesos $ http://127.0.0.1:5050 $ ./src/test-framework --master=127.0.0.1:5050 $ ./src/examples/java/test-framework 127.0.0.1:5050 $ ./src/examples/python/test-framework 127.0.0.1:5050 *Note: These examples assume you are running Mesos on your local machine. Following them will not allow you to access the Mesos web page in a production environment (e.g. on AWS). For that you will need to specify the actual IP of your host when launching the Mesos master and ensure your firewall settings allow access to port 5050 from the outside world.*