Apache Mesos环境搭建

Getting Started with Apache Mesos

Downloading Mesos

There are different ways you can get Mesos:

  1. Download the latest stable release from Apache (Recommended)

     $ wget http://www.apache.org/dist/mesos/0.18.0/mesos-0.18.0.tar.gz
     $ tar -zxf mesos-0.18.0.tar.gz
    
  2. Clone the Mesos git repository (Advanced Users Only)

     $ git clone http://git-wip-us.apache.org/repos/asf/mesos.git
    

System Requirements

  • Mesos runs on Linux (64 Bit) and Mac OSX (64 Bit).

  • Following are the instructions for stock Ubuntu 12.04 64 Bit. If you are using a different OS please install the packages accordingly.

     # Ensure apt-get is up to date.
     $ sudo apt-get update
    
     # Install build tools.
     $ sudo apt-get install build-essential
    
     # Install OpenJDK java.
     $ sudo apt-get install openjdk-6-jdk
    
     # Install devel python.
     $ sudo apt-get install python-dev python-boto
    
     # Install devel libcurl
     $ sudo apt-get install libcurl4-nss-dev
    
     # Install devel libsasl (***Only required for Mesos 0.14.0 or newer***).
     $ sudo apt-get install libsasl2-dev
    
  • If you are building from git repository, you will need to additionally install the following packages.

     # Install autotoconf and automake.
     $ sudo apt-get install autoconf
    
     # Install libtool.
     $ sudo apt-get install libtool
    

Building Mesos

    # Change working directory.
    $ cd mesos

    # Bootstrap (***Skip this if you are not building from git repo***).
    $ ./bootstrap

    # Configure and build.
    $ mkdir build
    $ cd build
    $ sudo ../configure
    $ sudo make

    # Run test suite.
    $ sudo make check

    # Install (***Optional***).
    $ sudo make install

Examples

  • Mesos comes bundled with example frameworks written in C++Java and Python.

     # Change into build directory.
     $ cd build
    
     # Start mesos master.
     $ ./bin/mesos-master.sh --ip=127.0.0.1
    
     # Start mesos slave.
     $ ./bin/mesos-slave.sh --master=127.0.0.1:5050
    
     # Visit the mesos web page.
     $ http://127.0.0.1:5050
    
     # Run C++ framework (***Exits after successfully running some tasks.***).
     $ ./src/test-framework --master=127.0.0.1:5050
    
     # Run Java framework (***Exits after successfully running some tasks.***).
     $ ./src/examples/java/test-framework 127.0.0.1:5050
    
     # Run Python framework (***Exits after successfully running some tasks.***).
     $ ./src/examples/python/test-framework 127.0.0.1:5050
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值